Skip to content

Commit d6801e7

Browse files
committed
managed minority deletions
1 parent 95cc0fe commit d6801e7

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

bu_isciii/templates/IRMA/ANALYSIS/ANALYSIS01_FLU_IRMA/04-irma/create_irma_vcf.py

+8
Original file line numberDiff line numberDiff line change
@@ -766,6 +766,14 @@ def combine_indels(vcf_dictionary):
766766
combined_vcf_dict[value["REF_POS"]] = content_dict
767767
elif value["TYPE"] == "DEL":
768768
sample_found = False
769+
minority = False
770+
for af in value["AF"]:
771+
if float(af) < 0.5:
772+
minority = True
773+
prev_sample_pos = ""
774+
if minority and len(value["SAMPLE_POS"]) == 1:
775+
sample_pos = value["SAMPLE_POS"][0]
776+
prev_sample_pos = sample_pos - 1
769777
for _, data in combined_vcf_dict.items():
770778
if data["TYPE"] == "DEL":
771779
if value["SAMPLE_POS"] == data["SAMPLE_POS"]:

0 commit comments

Comments
 (0)