Commit 7737211a authored by Celine Mercier's avatar Celine Mercier

Small fix in embl and genbank features parser

parent c953f0cb
......@@ -12,10 +12,6 @@ import re
from itertools import chain
# TODO cython
# TODO import Location functions for Genbank stuff (src/obitools/location/__init__.py)
_featureMatcher = re.compile(b'^(FT| ) [^ ].+\n((FT| ) .+\n)+',re.M)
_featureCleaner = re.compile(b'^FT',re.M)
......@@ -138,7 +134,7 @@ def extractTaxon(bytes text, dict tags):
s = [s]
t = set(int(v[6:]) for v in chain(*tuple(f[b'db_xref'] for f in s if b'db_xref' in f))
if v[0:6]=='taxon:')
if v[0:6]==b'taxon:')
if len(t)==1 :
taxid=t.pop()
if taxid >=0:
......@@ -147,5 +143,3 @@ def extractTaxon(bytes text, dict tags):
t = set(chain(*tuple(f[b'organism'] for f in s if b'organism' in f)))
if len(t)==1:
tags[b'organism']=t.pop()
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