From 089a7c44987e61d716b7d593508cb4a0241f56c5 Mon Sep 17 00:00:00 2001 From: pjentsch Date: Thu, 19 May 2022 17:47:34 -0700 Subject: [PATCH] add check for possibility that the ref base is not in the list of possible alts --- msa2vcf/msa2vcf.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/msa2vcf/msa2vcf.py b/msa2vcf/msa2vcf.py index aa7df9d..4fd4d1f 100644 --- a/msa2vcf/msa2vcf.py +++ b/msa2vcf/msa2vcf.py @@ -156,7 +156,8 @@ def deconvolute_IUPAC(var): no_iupac = iupac_to_base(base) if isinstance(no_iupac, list): num_alts = len(no_iupac) - no_iupac.remove(var[1]) + if var[1] in no_iupac: + no_iupac.remove(var[1]) var[3] = ','.join(no_iupac) var.append(round(1 / num_alts, 2))