From 2240756b32f792d60241a50c68bf538e813a721f Mon Sep 17 00:00:00 2001 From: Daniel Blankenberg Date: Wed, 30 Sep 2009 14:06:06 -0400 Subject: [PATCH] Fix reporting number of regions processed in MAF Stats tool. --- tools/maf/maf_stats.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/maf/maf_stats.py b/tools/maf/maf_stats.py index 0a5aa61c507..f08082ccac8 100644 --- a/tools/maf/maf_stats.py +++ b/tools/maf/maf_stats.py @@ -54,7 +54,7 @@ def __main__(): out = open(output_filename, 'w') - num_region = 0 + num_region = None species_summary = {} total_length = 0 #loop through interval file @@ -97,7 +97,8 @@ def __main__(): 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__()