From 07bc5d9e74775ad178c81891f5f8754e4a29d411 Mon Sep 17 00:00:00 2001 From: Tom White Date: Mon, 8 Mar 2021 11:05:04 +0000 Subject: [PATCH] Fix against xarray upstream due to https://github.com/pydata/xarray/pull/4940 --- sgkit/tests/test_hwe.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sgkit/tests/test_hwe.py b/sgkit/tests/test_hwe.py index fc3858892..e8dd2cfcc 100644 --- a/sgkit/tests/test_hwe.py +++ b/sgkit/tests/test_hwe.py @@ -139,7 +139,9 @@ def test_hwep_dataset__precomputed_counts(ds_neq: Dataset) -> None: cts = [1, 0, 2] # arg order: hets, hom1, hom2 gtc = xr.concat([(ac == ct).sum(dim="samples") for ct in cts], dim="counts").T ds = ds.assign(**{"variant_genotype_counts": gtc}) - p = hwep_test(ds, genotype_counts="variant_genotype_counts", merge=False) + p = hwep_test(ds, genotype_counts="variant_genotype_counts", merge=False)[ + "variant_hwe_p_value" + ].values assert np.all(p < 1e-8)