[hg] galaxy 3724: Change the way size of output file determined ...
details: http://www.bx.psu.edu/hg/galaxy/rev/007f175c8b88 changeset: 3724:007f175c8b88 user: Kelly Vincent <kpvincent@bx.psu.edu> date: Fri Apr 30 15:27:41 2010 -0400 description: Change the way size of output file determined in Bowtie and SAM-to_BAM to deal with memory limitation. diffstat: tools/samtools/sam_to_bam.py | 2 +- tools/sr_mapping/bowtie_wrapper.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diffs (26 lines): diff -r 85e05920bada -r 007f175c8b88 tools/samtools/sam_to_bam.py --- a/tools/samtools/sam_to_bam.py Fri Apr 30 15:20:04 2010 -0400 +++ b/tools/samtools/sam_to_bam.py Fri Apr 30 15:27:41 2010 -0400 @@ -94,7 +94,7 @@ tmp_stderr.close() if returncode != 0: raise Exception, stderr - if len( open( fai_index_file_path ).read().strip() ) == 0: + if os.path.getsize( fai_index_file_path ) == 0: raise Exception, 'Index file empty, there may be an error with your reference file or settings.' except Exception, e: #clean up temp files diff -r 85e05920bada -r 007f175c8b88 tools/sr_mapping/bowtie_wrapper.py --- a/tools/sr_mapping/bowtie_wrapper.py Fri Apr 30 15:20:04 2010 -0400 +++ b/tools/sr_mapping/bowtie_wrapper.py Fri Apr 30 15:27:41 2010 -0400 @@ -387,8 +387,8 @@ if returncode != 0: raise Exception, stderr # check that there are results in the output file - if len( open( options.output, 'rb' ).read().strip() ) == 0: - raise Exception, 'The output file is empty, there may be an error with your input file or settings.' + if os.path.getsize( options.output ) == 0: + raise Exception, 'The output file is empty, there may be an error with your input file or settings.' + '\nextra: ' + str(extra) except Exception, e: stop_err( 'Error aligning sequence. ' + str( e ) ) finally:
participants (1)
-
Nate Coraor