Skip to content

Commit

Permalink
Squash unintended rec rate test warnings popsim-consortium#1626
Browse files Browse the repository at this point in the history
  • Loading branch information
gregorgorjanc committed Dec 23, 2024
1 parent 02e63ee commit ca04e54
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,19 @@ def test_debug_runs(self):

@pytest.mark.filterwarnings("ignore:.*Zigzag_1S14.*:UserWarning")
def test_simulation_runs(self):
# With a recombination_map of None, we simulate a coalescent without
# recombination in msprime, with mutation rate equal to rate from model.
# When model has no specific recombination rate,
# we simulate coalescent without recombination.
# Otherwise, we use the rate from the model.
# We use mutation rate equal to rate from model
# (or species when the model does not have one.
if self.model.recombination_rate is None:
recombination_rate = 0
else:
recombination_rate = self.model.recombination_rate
contig = stdpopsim.Contig.basic_contig(
length=100, mutation_rate=self.model.mutation_rate
length=100,
mutation_rate=self.model.mutation_rate,
recombination_rate=recombination_rate,
)
# Generate vector with 2 samples for each pop with sampling enabled
samples = {}
Expand Down

0 comments on commit ca04e54

Please sign in to comment.