details: http://www.bx.psu.edu/hg/galaxy/rev/574cc8f15d2e changeset: 2590:574cc8f15d2e user: anton@nekrut-mbp.bx.psu.edu date: Thu Aug 20 17:33:39 2009 -0400 description: Fixed a stupid and truly horrible paired end splitter bug 3 file(s) affected in this change: static/welcome.html tools/metag_tools/split_paired_reads.py tools/solid_tools/maq_cs_wrapper.py diffs (76 lines): diff -r a7f9325bb319 -r 574cc8f15d2e static/welcome.html --- a/static/welcome.html Thu Aug 20 11:43:28 2009 -0400 +++ b/static/welcome.html Thu Aug 20 17:33:39 2009 -0400 @@ -71,7 +71,7 @@ <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td> - <a href="javascript:parent.show_in_overlay({url:'http://screencast.g2.bx.psu.edu/galaxy/quickie1_TabSeq/flow.html',width:640,height:500,scroll:'no'})"> + <a href="javascript:parent.show_in_overlay({url:'http://screencast.g2.bx.psu.edu/galaxy/quickie1_TabSeq/quickie1_TabSeq.flv',width:640,height:500,scroll:'no'})"> <div class="quickie"> <img src="images/qk/quickie1_small.png" border="0"> </div> diff -r a7f9325bb319 -r 574cc8f15d2e tools/metag_tools/split_paired_reads.py --- a/tools/metag_tools/split_paired_reads.py Thu Aug 20 11:43:28 2009 -0400 +++ b/tools/metag_tools/split_paired_reads.py Thu Aug 20 17:33:39 2009 -0400 @@ -1,7 +1,7 @@ #! /usr/bin/python """ -Split Solexa paired end reads +Split fixed length paired end reads """ import os, sys @@ -12,9 +12,13 @@ outfile_end1 = open(sys.argv[2], 'w') outfile_end2 = open(sys.argv[3], 'w') - for i, line in enumerate(file(infile)): + i = 0 + + for line in file( infile ): line = line.rstrip() - if not line or line.startswith('#'): continue + + if not line: + continue end1 = '' end2 = '' @@ -42,5 +46,9 @@ outfile_end1.write('%s\n' %(end1)) outfile_end2.write('%s\n' %(end2)) + i += 1 + + if i % 4 != 0 : + sys.stderr.write("WARNING: Number of lines in the input file was not divisible by 4.\nCheck consistency of the input fastq file.\n") outfile_end1.close() outfile_end2.close() \ No newline at end of file diff -r a7f9325bb319 -r 574cc8f15d2e tools/solid_tools/maq_cs_wrapper.py --- a/tools/solid_tools/maq_cs_wrapper.py Thu Aug 20 11:43:28 2009 -0400 +++ b/tools/solid_tools/maq_cs_wrapper.py Thu Aug 20 17:33:39 2009 -0400 @@ -48,9 +48,9 @@ cmd1 = "solid2fastq_modified.pl 'yes' %s %s %s %s %s %s %s 2>&1" %(tmpf.name,tmpr.name,tmps.name,f3_read_fname,f3_qual_fname,r3_read_fname,r3_qual_fname) try: os.system(cmd1) - os.system('zcat -f %s >> %s' %(tmpf.name,tmpffastq.name)) - os.system('zcat -f %s >> %s' %(tmpr.name,tmprfastq.name)) - os.system('zcat -f %s >> %s' %(tmps.name,tmpsfastq.name)) + os.system('gunzip -c %s >> %s' %(tmpf.name,tmpffastq.name)) + os.system('gunzip -c %s >> %s' %(tmpr.name,tmprfastq.name)) + os.system('gunzip -c %s >> %s' %(tmps.name,tmpsfastq.name)) except Exception, eq: stop_err("Error converting data to fastq format." + str(eq)) @@ -135,7 +135,7 @@ cmd1 = "solid2fastq_modified.pl 'no' %s %s %s %s %s %s %s 2>&1" %(tmpf.name,None,None,f3_read_fname,f3_qual_fname,None,None) try: os.system(cmd1) - os.system('zcat -f %s >> %s' %(tmpf.name,tmpfastq.name)) + os.system('gunzip -c %s >> %s' %(tmpf.name,tmpfastq.name)) tmpf.close() except: stop_err("Error converting data to fastq format.")