diff --git a/src/obitools/ecopcr/sequence.py b/src/obitools/ecopcr/sequence.py index bd8e4f3..e10928f 100644 --- a/src/obitools/ecopcr/sequence.py +++ b/src/obitools/ecopcr/sequence.py @@ -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'])