Skip to content

Commit

Permalink
Illustrate use of both dtwf and hudson msprime models
Browse files Browse the repository at this point in the history
I always forget what the syntax is here! I think others might find it useful.
  • Loading branch information
hyanwong authored Oct 24, 2024
1 parent 0d91be4 commit 544f0be
Showing 1 changed file with 12 additions and 1 deletion.
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

0 comments on commit 544f0be

Please sign in to comment.