[hg] galaxy 2806: Fix reporting number of regions processed in M...
details: http://www.bx.psu.edu/hg/galaxy/rev/268ab95fc8a7 changeset: 2806:268ab95fc8a7 user: Dan Blankenberg <dan@bx.psu.edu> date: Wed Sep 30 14:06:06 2009 -0400 description: Fix reporting number of regions processed in MAF Stats tool. 1 file(s) affected in this change: tools/maf/maf_stats.py diffs (22 lines): diff -r c63a444cd7ba -r 268ab95fc8a7 tools/maf/maf_stats.py --- a/tools/maf/maf_stats.py Wed Sep 30 11:40:09 2009 -0400 +++ b/tools/maf/maf_stats.py Wed Sep 30 14:06:06 2009 -0400 @@ -54,7 +54,7 @@ out = open(output_filename, 'w') - num_region = 0 + num_region = None species_summary = {} total_length = 0 #loop through interval file @@ -97,7 +97,8 @@ for spec in species_summary: out.write( "%s\t%s\t%.4f\n" % ( spec, species_summary[spec], float( species_summary[spec] ) / total_length ) ) out.close() - print "%i regions were processed with a total length of %i." % ( num_region, total_length ) + if num_region is not None: + print "%i regions were processed with a total length of %i." % ( num_region + 1, total_length ) maf_utilities.remove_temp_index_file( index_filename ) if __name__ == "__main__": __main__()
participants (1)
-
Nate Coraor