Commit 23d7c218 by Frédéric Boyer

--no commit message

parent 673ea5bd
......@@ -108,11 +108,13 @@ class EcoPCRDBSequenceWriter(object):
totalSize = 4 + 20 + 4 + 4 + 4 + cptseqlength + delength
if self._taxonomy is None or 'taxid' not in seq :
raise Exception("Taxonomy error: "+seq.id)
taxon=-1
else:
taxon=self._taxonomy.findIndex(seq['taxid'])
if taxon==-1:
raise Exception("Taxonomy error for %s: %s"%(seq.id, "taxonomy is missing" if self._taxonomy is None else "sequence has no taxid" if 'taxid' not in seq else "wrong taxid"))
try:
packed = struct.pack('> I i 20s I I I %ds %ds' % (delength,cptseqlength),
totalSize,
......
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