
details: http://www.bx.psu.edu/hg/galaxy/rev/108533bf35b8 changeset: 2595:108533bf35b8 user: rc date: Fri Aug 21 15:18:17 2009 -0400 description: Merge with 2c1916d89194f6802102cab13e67bebcf68d1d75 0 file(s) affected in this change: diffs (131 lines): diff -r 55b0c25aa164 -r 108533bf35b8 lib/galaxy/tools/actions/upload.py --- a/lib/galaxy/tools/actions/upload.py Fri Aug 21 15:17:26 2009 -0400 +++ b/lib/galaxy/tools/actions/upload.py Fri Aug 21 15:18:17 2009 -0400 @@ -20,12 +20,10 @@ for upload_dataset in incoming['files']: f = upload_dataset['file_data'] if isinstance( f, FieldStorage ): - # very small files can be StringIOs - if 'name' in dir( f.file ) and f.file.name != '<fdopen>': - local_filename = util.mkstemp_ln( f.file.name, 'upload_file_data_' ) - f.file.close() - else: - local_filename = datatypes.sniff.stream_to_file( f.file, prefix="strio_upload_file_" )[0] + assert not isinstance( f.file, StringIO.StringIO ) + assert f.file.name != '<fdopen>' + local_filename = util.mkstemp_ln( f.file.name, 'upload_file_data_' ) + f.file.close() upload_dataset['file_data'] = dict( filename = f.filename, local_filename = local_filename ) if upload_dataset['url_paste'].strip() != '': diff -r 55b0c25aa164 -r 108533bf35b8 lib/galaxy/web/framework/base.py --- a/lib/galaxy/web/framework/base.py Fri Aug 21 15:17:26 2009 -0400 +++ b/lib/galaxy/web/framework/base.py Fri Aug 21 15:18:17 2009 -0400 @@ -216,11 +216,18 @@ # tempfiles. Necessary for externalizing the upload tool. It's a little hacky # but for performance reasons it's way better to use Paste's tempfile than to # create a new one and copy. -import cgi +import cgi, tempfile class FieldStorage( cgi.FieldStorage ): def make_file(self, binary=None): - import tempfile return tempfile.NamedTemporaryFile() + def read_lines(self): + # Always make a new file + self.file = self.make_file() + self.__file = None + if self.outerboundary: + self.read_lines_to_outerboundary() + else: + self.read_lines_to_eof() cgi.FieldStorage = FieldStorage class Request( webob.Request ): diff -r 55b0c25aa164 -r 108533bf35b8 static/welcome.html --- a/static/welcome.html Fri Aug 21 15:17:26 2009 -0400 +++ b/static/welcome.html Fri Aug 21 15:18:17 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 55b0c25aa164 -r 108533bf35b8 tools/extract/liftOver_wrapper_code.py --- a/tools/extract/liftOver_wrapper_code.py Fri Aug 21 15:17:26 2009 -0400 +++ b/tools/extract/liftOver_wrapper_code.py Fri Aug 21 15:18:17 2009 -0400 @@ -3,7 +3,6 @@ to_dbkey = param_dict['to_dbkey'].split('.')[0].split('To')[1] to_dbkey = to_dbkey[0].lower()+to_dbkey[1:] out_data['out_file1'].set_dbkey(to_dbkey) - out_data['out_file2'].set_dbkey(to_dbkey) out_data['out_file1'].name = out_data['out_file1'].name + " [ MAPPED COORDINATES ]" out_data['out_file2'].name = out_data['out_file2'].name + " [ UNMAPPED COORDINATES ]" diff -r 55b0c25aa164 -r 108533bf35b8 tools/metag_tools/split_paired_reads.py --- a/tools/metag_tools/split_paired_reads.py Fri Aug 21 15:17:26 2009 -0400 +++ b/tools/metag_tools/split_paired_reads.py Fri Aug 21 15:18:17 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 55b0c25aa164 -r 108533bf35b8 tools/solid_tools/maq_cs_wrapper.py --- a/tools/solid_tools/maq_cs_wrapper.py Fri Aug 21 15:17:26 2009 -0400 +++ b/tools/solid_tools/maq_cs_wrapper.py Fri Aug 21 15:18:17 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.")