Skip to content

Commit 6397f76

Browse files
committed
Change forwards -> forward
1 parent ff4575c commit 6397f76

5 files changed

Lines changed: 24 additions & 23 deletions

File tree

completing_forward_sims.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -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)
1919
simulators such as [SLiM](https://messerlab.org/slim)
2020
and [fwdpy11](https://fwdpy11.readthedocs.io/) (see the
2121
{ref}`sec_tskit_forward_simulations` tutorial).
2222
There are many advantages to using forward-time simulators, but they
2323
are usually quite slow compared to similar coalescent simulations. In this
2424
section 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
2626
simulation 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(
133133
coalesced_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
137137
Wright-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
168169
process have some slightly odd properties that are important to be aware of.
169170
In the example above, we can see that the old roots are still present in both trees,
170171
even through they have only one child and are clearly redundant.
@@ -179,7 +180,7 @@ they may cause problems:
179180
2. 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

184185
For these reasons it may be better to remove this redundancy from your
185186
computed tree sequence which is easily done using the

forward_sims.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ along with their genomes, storing inherited genomic regions as well as the full
2525
The code in this tutorial is broken into separate functions for clarity and
2626
to make it easier to modify for your own purposes; a simpler and substantially
2727
condensed forward-simulator is coded as a single function at the top of the
28-
{ref}`sec_completing_forwards_simulations` tutorial.
28+
{ref}`sec_completing_forward_simulations` tutorial.
2929

3030
:::{note}
3131
If you are simply trying to obtain a tree sequence which is
@@ -210,7 +210,7 @@ that the child inherits a mosaic of the two genomes present in each parent.
210210

211211
The exact details of the mosaic will depend on the model of recombination you
212212
wish to implement. For instance, a simple model such as that in the
213-
{ref}`sec_completing_forwards_simulations` tutorial might assume exactly one
213+
{ref}`sec_completing_forward_simulations` tutorial might assume exactly one
214214
crossover per chromosome. A complex model might allow not just multiple
215215
crossovers with e.g. recombination "hotspots", but also non-crossover events
216216
such as {ref}`msprime:sec_ancestry_gene_conversion`.
@@ -475,7 +475,7 @@ in which an alternative technique, such as backward-in-time coalescent simulatio
475475
is used to to fill in the "head" of the tree sequence. In other words,
476476
we can use a fast backward-time simulator such as `msprime` to simulate the
477477
prior genealogy of the oldest nodes in the simplified tree sequence.
478-
Details are described in the {ref}`sec_completing_forwards_simulations`
478+
Details are described in the {ref}`sec_completing_forward_simulations`
479479
tutorial.
480480

481481
## More complex forward-simulations

more_forward_sims.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,5 +254,5 @@ This will primarily deal with sites and mutations (and mutational metadata).
254254
We could also include details on selection, if that seems sensible.
255255

256256
The section in that workbook on "Starting with a prior history" should be put in
257-
the {ref}`sec_completing_forwards_simulations` tutorial.
257+
the {ref}`sec_completing_forward_simulations` tutorial.
258258
:::

simulation_overview.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,29 +44,29 @@ Compare to expectations
4444
(e.g. for use as a null model). For instance, comparison to *neutral* simulations
4545
can be used to identify regions subject to selection.
4646

47-
There are two major forms of population genetic simulation: **forwards-time**
48-
and **backwards-time**. In general, forwards-time simulation is detailed and more
49-
realistic, while backwards-time simulation is fast and efficient.
47+
There are two major forms of population genetic simulation: **forward-time**
48+
and **backward-time**. In general, forward-time simulation is detailed and more
49+
realistic, while backward-time simulation is fast and efficient.
5050

5151
More specifically, apart from a
5252
{ref}`few exceptions <msprime:sec_ancestry_models_selective_sweeps>`,
53-
backwards-time simulations are primarily focused on neutral simulations, while
53+
backward-time simulations are primarily focused on neutral simulations, while
5454
forward simulation is better suited to complex simulations, including those involving
5555
selection and continuous space.
5656

5757
## Advantages of tree sequences
5858

59-
Some forwards-time ([SLiM](http://messerlab.org/slim/),
60-
[fwdpy](http://molpopgen.github.io/fwdpy/)) and backwards-time
59+
Some forward-time ([SLiM](http://messerlab.org/slim/),
60+
[fwdpy](http://molpopgen.github.io/fwdpy/)) and backward-time
6161
([msprime](https://tskit.dev/msprime)) simulators have a built-in capacity to output
6262
tree sequences. This can have several benefits:
6363

6464
1. Neutral mutations, which often account for the majority of genetic variation, do not
6565
need to be tracked during the simulation, but can be added afterwards. See
6666
"{ref}`sec_tskit_no_mutations`".
67-
2. Tree sequences can be used as an interchange format to combine backwards and
68-
forwards simulations, allowing you to take advantage of the advantages of both
69-
approaches. This is detailed in {ref}`sec_completing_forwards_simulations`.
67+
2. Tree sequences can be used as an interchange format to combine backward and
68+
forward simulations, allowing you to take advantage of the advantages of both
69+
approaches. This is detailed in {ref}`sec_completing_forward_simulations`.
7070

7171
## Some tips on simulation
7272

terminology_and_concepts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ objects. In tree sequences, however, all nodes, both internal and terminal,
145145
are represented by an **integer ID**, unique over the entire tree sequence, and which exists
146146
at a specific point in time. A branch point in any of the trees is associated with
147147
an *internal node*, representing an ancestor in which a single DNA
148-
sequence was duplicated (in forwards-time terminology) or in which multiple sequences
148+
sequence was duplicated (in forward-time terminology) or in which multiple sequences
149149
coalesced (in backwards-time terminology).
150150

151151

0 commit comments

Comments
 (0)