BUG obiconvert: could add sequences without/with bad taxid
This commit is contained in:
@ -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'])
|
||||
|
Reference in New Issue
Block a user