From 7737211ac27ef97ab7b5031ae2004539d0cb3c29 Mon Sep 17 00:00:00 2001 From: Celine Mercier Date: Fri, 15 Mar 2019 15:50:11 +0100 Subject: [PATCH] Small fix in embl and genbank features parser --- python/obitools3/parsers/embl_genbank_features.pyx | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/python/obitools3/parsers/embl_genbank_features.pyx b/python/obitools3/parsers/embl_genbank_features.pyx index 985b351..a9da744 100755 --- a/python/obitools3/parsers/embl_genbank_features.pyx +++ b/python/obitools3/parsers/embl_genbank_features.pyx @@ -11,10 +11,6 @@ import logging 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() - -