From 69f9293d43b5be27703543df1d1e2a8c94276795 Mon Sep 17 00:00:00 2001 From: Tim Millar Date: Mon, 4 Sep 2023 15:47:51 +1200 Subject: [PATCH] Faster count_variant_alleles in Tajimas_D --- sgkit/stats/popgen.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sgkit/stats/popgen.py b/sgkit/stats/popgen.py index c2bb05ad9..739211880 100644 --- a/sgkit/stats/popgen.py +++ b/sgkit/stats/popgen.py @@ -430,7 +430,11 @@ def Tajimas_D( [1.10393559, 1.10393559]]) """ ds = define_variable_if_absent( - ds, variables.variant_allele_count, variant_allele_count, count_variant_alleles + ds, + variables.variant_allele_count, + variant_allele_count, + count_variant_alleles, + using=variables.call_genotype, ) ds = define_variable_if_absent( ds, variables.stat_diversity, stat_diversity, diversity