@@ -9,20 +9,20 @@ kernelspec:
99 name : python3
1010---
1111
12- (sec_completing_forwards_simulations )=
12+ (sec_completing_forward_simulations )=
1313
14- # Completing forwards simulations
14+ # Recapitation: completing a forward simulation
1515
16- The `` msprime `` simulator generates tree sequences using the backwards in
17- time coalescent model. But it is also possible to output tree sequences
18- from [ forwards -time] ( https://doi.org/10.1371/journal.pcbi.1006581 )
16+ The `` msprime `` simulator generates tree sequences using the
17+ backward-in- time coalescent model. But it is also possible to output tree sequences
18+ from [ forward -time] ( https://doi.org/10.1371/journal.pcbi.1006581 )
1919simulators such as [ SLiM] ( https://messerlab.org/slim )
2020and [ fwdpy11] ( https://fwdpy11.readthedocs.io/ ) (see the
2121{ref}` sec_tskit_forward_simulations ` tutorial).
2222There are many advantages to using forward-time simulators, but they
2323are usually quite slow compared to similar coalescent simulations. In this
2424section we show how to combine the best of both approaches by simulating
25- the recent past using a forwards -time simulator and then complete the
25+ the recent past using a forward -time simulator and then complete the
2626simulation of the ancient past using `` msprime `` . (We sometimes refer to this
2727"recapitation", as we can think of it as adding a "head" onto a tree sequence.)
2828
@@ -133,9 +133,10 @@ coalesced_ts = msprime.sim_ancestry(
133133coalesced_ts.draw_svg()
134134```
135135
136- The trees have fully coalesced and we've successfully combined a forwards -time
136+ The trees have fully coalesced and we've successfully combined a forward -time
137137Wright-Fisher simulation with a coalescent simulation: hooray!
138138
139+ (sec_completing_forward_simulations_input_roots)=
139140
140141## Why keep input roots (i.e., the initial generation)?
141142
@@ -164,7 +165,7 @@ the method presented here.
164165
165166## Topology gotchas
166167
167- The trees that we output from this combined forwards and backwards simulation
168+ The trees that we output from this combined forward and backward simulation
168169process have some slightly odd properties that are important to be aware of.
169170In the example above, we can see that the old roots are still present in both trees,
170171even through they have only one child and are clearly redundant.
@@ -179,7 +180,7 @@ they may cause problems:
1791802 . If you are computing the overall tree "height" by taking the time of the
180181 root node, you may overestimate the height because there is a unary edge
181182 above the "real" root (this would happen if one of the trees had already
182- coalesced in the forwards -time simulation).
183+ coalesced in the forward -time simulation).
183184
184185For these reasons it may be better to remove this redundancy from your
185186computed tree sequence which is easily done using the
0 commit comments