Commit c0d80e07 by Frédéric Boyer

Bug sur merged_KEY lorsque la merged_KEY existe deja dans les sequences : la…

Bug sur merged_KEY lorsque la merged_KEY existe deja dans les sequences : la somme n'etait pas effectuee correctement
parent 2491a562
......@@ -68,14 +68,15 @@ def uniqSequence(seqIterator,taxonomy=None,mergedKey=None,mergeIds=False,categor
s["taxid_dist"][seq.id]=seq['taxid']
mkey = "merged_%s" % key
#cas ou on met jour les merged_keys mais il n'y a pas de merged_keys dans la sequence qui arrive
if key in seq:
s[mkey][seq[key]]=s[mkey].get(seq[key],0)+1
if mkey in seq:
for skey in seq[mkey]:
if skey in s:
s[mkey][skey]=s[mkey].get(seq[skey],0)+seq[mkey][skey]
else:
s[mkey][skey]=seq[mkey][skey]
#cas ou merged_keys existe deja
else:
if mkey in seq:
for skey in seq[mkey]:
s[mkey][skey]=s[mkey].get(skey,0)+seq[mkey][skey]
for key in seq.iterkeys():
# Merger proprement l'attribut merged s'il exist
......
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