Skip to content
Open
Show file tree
Hide file tree
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
19 changes: 13 additions & 6 deletions getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ of the chromosome, then throw some neutral mutations onto the resulting tree seq
```{code-cell} ipython3
import msprime

pop_size=10_000
pop_size=5000
seq_length=10_000_000

sweep_model = msprime.SweepGenicSelection(
Expand Down Expand Up @@ -167,9 +167,11 @@ using the {meth}`Tree.draw_svg` method.
```{code-cell} ipython3
swept_tree = ts.at(5_000_000) # or you can get e.g. the nth tree using ts.at_index(n)
intvl = swept_tree.interval
print(f"Tree number {swept_tree.index}, which runs from position {intvl.left} to {intvl.right}:")
# Draw it at a wide size, to make room for all 40 tips
swept_tree.draw_svg(size=(1000, 200))

swept_tree.draw_svg(
size=(1000, 200), # Draw the tree at a wide size, to make room for all 40 tips
title=f"Tree number {swept_tree.index}, which runs from position {intvl.left} to {intvl.right}:"
)
```
:::{margin}
The {ref}`visualization tutorial<sec_tskit_viz>` gives more drawing possibilities
Expand All @@ -193,8 +195,13 @@ more than one tree: either the entire tree sequence, or

```{code-cell} ipython3
reduced_ts = ts.simplify([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) # simplify to the first 10 samples
print("Genealogy of the first 10 samples for the first 5kb of the genome")
reduced_ts.draw_svg(x_lim=(0, 5000))

reduced_ts.draw_svg(
x_lim=(0, 10000),
title="Genealogy of the first 10 samples for the first 10kb of the genome",
y_axis=True,
y_ticks=[0, 2000, 4000, 6000, 8000],
)
```

These are much more standard-looking coalescent trees, with far longer branches higher
Expand Down
4 changes: 2 additions & 2 deletions terminology_and_concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -436,8 +436,8 @@ There is a subtle distinction between common ancestry and coalescence. In partic

The term Ancestral Recombination Graph (ARG), is commonly used to describe a genetic
genealogy. In particular, many (but not all) authors use it to mean a genetic
genealogy in which details of the position and potentially the timing of all
recombination and common ancestor events are explicitly stored. For clarity
genealogy which explictly records details of the position - and potentially the timing -
of all recombination and common ancestor events. For clarity
we refer to this sort of genetic genealogy as a "full ARG". Succinct tree sequences can
represent many different sorts of ARGs, including "full ARGs", by incorporating extra
non-coalescent nodes (see the {ref}`sec_args` tutorial). However, tree sequences are
Expand Down
9 changes: 5 additions & 4 deletions what_is.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ The second tree shows the relationships between positions 367 and 600.
Note that in the first tree, genome $\mathrm{e}$ (highlighted in red) is closest to
$\mathrm{a}-\mathrm{d}$, whereas in the second tree $\mathrm{e}$ is closest to
$\mathrm{f}-\mathrm{h}$. The third tree shows the relationships between positions
600 and 900 (the end of the genome). In this case, an entire subtree (or "clade"),
600 and the end of the genome. In this case, an entire subtree (or "clade"),
composed of nodes $\mathrm{e}-\mathrm{h}$ has changed its relationship with the other six
genomes. More specifically, the most recent common ancestor (MRCA) with any of these
others has switched: in the third tree it is now above $\mathrm{i}$ and $\mathrm{j}$.
Expand All @@ -246,9 +246,10 @@ based on a network of *genetic ancestry*, in which
(represented by red symbols below) has led
to different regions of the chromosome having different histories. Another way of
thinking about the tree sequence above is that it describes the full genetic genealogy
of our 10 genomes. If we combine all the relationships encoded in the trees (you can
loosely think of this as lying the trees on top of each other), the result is a network or
_graph_ (hence the term "[ARG](https://doi.org/10.1371/journal.pgen.1011110)")
of our 10 genomes. If we combine all the relationships encoded in the trees - you can
loosely think of this as lying the trees on top of each other - the result is a network or
[_graph_](https://en.wikipedia.org/wiki/Graph_(discrete_mathematics)), hence the term
"[ARG](https://doi.org/10.1371/journal.pgen.1011110)"

```{code-cell} ipython3
:"tags": ["hide-input"]
Expand Down
Loading