Skip to content

Commit 06abe13

Browse files
committed
Update test assertion to match corrected max_missing_an denominator
1 parent c906faa commit 06abe13

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

tests/anoph/test_snp_data.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1723,8 +1723,9 @@ def test_biallelic_snp_calls_and_diplotypes_with_conditions_fractional(
17231723
an = ac.sum(axis=1)
17241724
ac_min = ac.min(axis=1)
17251725
assert np.all((ac_min / an) >= min_minor_ac)
1726-
an_missing = (ds.sizes["samples"] * ds.sizes["ploidy"]) - an
1727-
assert np.all((an_missing / an) <= max_missing_an)
1726+
an_total = ds.sizes["samples"] * ds.sizes["ploidy"]
1727+
an_missing = an_total - an
1728+
assert np.all((an_missing / an_total) <= max_missing_an)
17281729
gt = ds["call_genotype"].values
17291730
ac_check = allel.GenotypeArray(gt).count_alleles(max_allele=1)
17301731
assert np.all(ac == ac_check)

0 commit comments

Comments
 (0)