From 55d4f98d60a1c51ba9ded99a46214fbb017f4ef7 Mon Sep 17 00:00:00 2001 From: Celine Mercier Date: Wed, 29 Apr 2020 14:24:40 +0200 Subject: [PATCH] obi annotate: fixed annotation at ranks --- python/obitools3/commands/annotate.pyx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/python/obitools3/commands/annotate.pyx b/python/obitools3/commands/annotate.pyx index 640be94..4bc613e 100755 --- a/python/obitools3/commands/annotate.pyx +++ b/python/obitools3/commands/annotate.pyx @@ -13,7 +13,8 @@ from obitools3.dms.capi.obiview cimport NUC_SEQUENCE_COLUMN, \ ID_COLUMN, \ DEFINITION_COLUMN, \ QUALITY_COLUMN, \ - COUNT_COLUMN + COUNT_COLUMN, \ + TAXID_COLUMN import time import math @@ -175,8 +176,8 @@ def sequenceTaggerGenerator(config, taxo=None): counter[0]+=1 for rank in annoteRank: - if 'taxid' in seq: - taxid = seq['taxid'] + if TAXID_COLUMN in seq: + taxid = seq[TAXID_COLUMN] if taxid is not None: rtaxid = taxo.get_taxon_at_rank(taxid, rank) if rtaxid is not None: