From b2b847e8689c1e29c669d82fcde1ae30b43557b2 Mon Sep 17 00:00:00 2001 From: Oliver Schwengers Date: Wed, 13 Nov 2024 20:11:24 +0100 Subject: [PATCH] keep INSDC io downward compatible --- bakta/io/insdc.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bakta/io/insdc.py b/bakta/io/insdc.py index 836559f9..d84af7a3 100644 --- a/bakta/io/insdc.py +++ b/bakta/io/insdc.py @@ -187,7 +187,8 @@ def build_biopython_sequence_list(data: dict, features: Sequence[dict]): qualifiers[bc.INSDC_FEATURE_PSEUDOGENE] = bc.INSDC_FEATURE_PSEUDOGENE_TYPE_UNKNOWN elif(feature['type'] == bc.FEATURE_TM_RNA): qualifiers['inference'] = 'profile:aragorn:1.2' - qualifiers['tag_peptide'] = f"{feature['tag']['start']}..{feature['tag']['stop']}" + if('tag' in feature): + qualifiers['tag_peptide'] = f"{feature['tag']['start']}..{feature['tag']['stop']}" if feature['strand'] == bc.STRAND_REVERSE: qualifiers['tag_peptide'] = f"complement({qualifiers['tag_peptide']})" insdc_feature_type = bc.INSDC_FEATURE_TM_RNA