From aa94a7ec144638ec8739bacacc9ff5cc9f4860cc Mon Sep 17 00:00:00 2001 From: Susanna Kiwala Date: Fri, 6 Oct 2017 09:18:55 -0500 Subject: [PATCH] Fix error caused by how VEP annotates structural variants --- add_annotations_to_table_helper.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/add_annotations_to_table_helper.py b/add_annotations_to_table_helper.py index cbb93cc..f7a3fe5 100644 --- a/add_annotations_to_table_helper.py +++ b/add_annotations_to_table_helper.py @@ -44,6 +44,10 @@ def resolve_alleles(entry, csq_alleles): for alt in alts: if len(alt) > len(entry.REF) and 'insertion' in csq_alleles: alleles[alt] = 'insertion' + elif len(alt) < len(entry.REF) and 'deletion' in csq_alleles: + alleles[alt] = 'deletion' + elif len(csq_alleles) == 1: + alleles[alt] = list(csq_alleles)[0] else: for alt in entry.ALT: alt = str(alt)