Commit 673ea5bd by Frédéric Boyer

BUG obiconvert: could add sequences without/with bad taxid

parent 733707a8
......@@ -69,7 +69,7 @@ class EcoPCRDBSequenceWriter(object):
ecoTaxonomyWriter(dbname,self._taxonomy)
print >> sys.stderr,"Ok"
# Identifiy the next sequence file numbre
# Identifiy the next sequence file number
if fileidx is None:
p = re.compile(r'([0-9]{3})\.sdx')
fileidx = max(list(int(p.search(i).group(1))
......@@ -107,7 +107,8 @@ class EcoPCRDBSequenceWriter(object):
totalSize = 4 + 20 + 4 + 4 + 4 + cptseqlength + delength
if self._taxonomy is None or 'taxid' not in seq:
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'])
......
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