From 21e7df31513924d981669a2337a4f6f85b333d32 Mon Sep 17 00:00:00 2001 From: Matt Welland Date: Tue, 2 Apr 2024 13:29:42 +1000 Subject: [PATCH] Integer-conformant AF values --- src/sv-pipeline/05_annotation/scripts/compute_AFs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sv-pipeline/05_annotation/scripts/compute_AFs.py b/src/sv-pipeline/05_annotation/scripts/compute_AFs.py index b805f70de..323a32b03 100755 --- a/src/sv-pipeline/05_annotation/scripts/compute_AFs.py +++ b/src/sv-pipeline/05_annotation/scripts/compute_AFs.py @@ -180,7 +180,7 @@ def calc_allele_freq(record, samples, prefix=None, hemi=False): # Adjust hemizygous allele number and allele count, if optioned if hemi: - AN = AN / 2 + AN = round(AN / 2) # For hemizygous sites, AC must be the sum of all non-reference *genotypes*, not alleles AC = n_gts_with_gt_0_alts