Skip to content

Commit eecbb93

Browse files
tomwhitemergify[bot]
authored andcommitted
Be explicit that scikit-allel can only calculate Fst for pairs of cohorts
1 parent 032abb6 commit eecbb93

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

sgkit/tests/test_popgen.py

+4-5
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,10 @@ def test_divergence(size, n_cohorts):
8383
np.testing.assert_allclose(div, ts_div)
8484

8585

86-
@pytest.mark.parametrize(
87-
"size, n_cohorts",
88-
[(2, 2), (3, 2), (10, 2), (100, 2)],
89-
)
90-
def test_Fst__Hudson(size, n_cohorts):
86+
@pytest.mark.parametrize("size", [2, 3, 10, 100])
87+
def test_Fst__Hudson(size):
88+
# scikit-allel can only calculate Fst for pairs of cohorts (populations)
89+
n_cohorts = 2
9190
ts = msprime.simulate(size, length=100, mutation_rate=0.05, random_seed=42)
9291
subsets = np.array_split(ts.samples(), n_cohorts)
9392
ds = ts_to_dataset(ts) # type: ignore[no-untyped-call]

0 commit comments

Comments
 (0)