Commit 1dad3bf0 by Frédéric Boyer

-r option fix

parent b25091e8
......@@ -85,15 +85,20 @@ if __name__=='__main__':
listtaxonbyrank = {}
for seq in entries:
for rank,rankid in ranks:
if rank != 'no rank':
t = tax.getTaxonAtRank(seq['taxid'],rankid)
if t is not None:
if rank in listtaxonbyrank:
listtaxonbyrank[rank].add(t)
else:
listtaxonbyrank[rank]=set([t])
taxid = seq['taxid']
if reduce(lambda x,y: x or y,
(tax.isAncestor(r,taxid) for r in options.required),
False):
for rank,rankid in ranks:
if rank != 'no rank':
t = tax.getTaxonAtRank(seq['taxid'],rankid)
if t is not None:
if rank in listtaxonbyrank:
listtaxonbyrank[rank].add(t)
else:
listtaxonbyrank[rank]=set([t])
dbstats= dict((x,len(listtaxonbyrank[x])) for x in listtaxonbyrank)
ranknames = [x[0] for x in ranks]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment