Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Illustrate use of both dtwf and hudson msprime models #1587

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion docs/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,18 @@ defined above. The simulation results are recorded in a tree sequence object

.. code-block:: python

ts = engine.simulate(model, contig, samples)
ts = engine.simulate(
model, contig, samples,
msprime_model="dtwf", msprime_change_model=[(20, "hudson")] # optional
)

Above we have also also illustrated how to specify different msprime models,
for different time periods. The discrete time Wright Fisher ("dtwf") model
applies at the present day, followed by a switch to the more efficient "hudson"
coalescent model when the backward simulation reaches 20 generations ago
and older. Switching models like this can be a useful compromise in cases
where the default Hudson model is an inaccurate approximation for the most
recent few generations.

Sanity check the tree sequence output
-------------------------------------
Expand Down
Loading