Skip to content

Commit

Permalink
Catch unknown key error and continue
Browse files Browse the repository at this point in the history
  • Loading branch information
skoren committed Apr 5, 2015
1 parent 6760639 commit 3e226e2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Utilities/python/get_classify_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,10 @@ def get_classify_stats(ocf,cf,ck,out_dir,outf,outfo,taxa_level):
summary.p("Originally classified contigs:")
summary.table(border="1")
for key in origContigsByClass:
class_name = id_class[key]
try:
class_name = id_class[key]
except KeyError:
continue
summary.tr()
summary.add("<td align=\"left\">%s</td><td align=\"right\">%d</td><td align=\"right\">%3.2f%%</td>"%(class_name, origContigsByClass[key], origContigsByClass[key]/float(origClassifiedCount)*100))
summary.tr.close()
Expand Down

0 comments on commit 3e226e2

Please sign in to comment.