From a449d3f45c4cdb2044b67c63cc01d9bc2efd04bf Mon Sep 17 00:00:00 2001 From: MarvinDo Date: Mon, 3 Jun 2024 11:09:07 +0200 Subject: [PATCH] fixed a bug in consequence annotation --- src/annotation_service/annotation_jobs/consequence_job.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/annotation_service/annotation_jobs/consequence_job.py b/src/annotation_service/annotation_jobs/consequence_job.py index 543c1d02..00b7f39a 100644 --- a/src/annotation_service/annotation_jobs/consequence_job.py +++ b/src/annotation_service/annotation_jobs/consequence_job.py @@ -51,12 +51,14 @@ def save_to_db(self, info, variant_id, conn): # T|upstream_gene_variant|MODIFIER|FTLP14|HGNC:37964|ENST00000562087.2|Transcript||||, # T|upstream_gene_variant|MODIFIER|CDH1|HGNC:1748|ENST00000562118.1|Transcript|||| for source in sources: - info_field = info_field_prefix + source + info_field = info_field_prefix + source + "=" csq_info = functions.find_between(info, info_field, '(;|$)') if csq_info is None: continue csq_entries = csq_info.split(',') for csq_entry in csq_entries: + if csq_entry.strip() == '': + continue parts = csq_entry.strip().split('|') feature_type = parts[6] if feature_type.lower() != "transcript":