Skip to content

Commit f27b81d

Browse files
Merge branch 'main' into gg_tutorial_edits
2 parents aea3587 + 6db9629 commit f27b81d

File tree

7 files changed

+32
-15
lines changed

7 files changed

+32
-15
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,23 @@ on:
1010
# This job installs dependencies, build the book, and pushes it to `gh-pages`
1111
jobs:
1212
build:
13-
runs-on: ubuntu-latest
13+
runs-on: ubuntu-24.04
1414
steps:
1515
- name: Cancel Previous Runs
16-
uses: styfle/[email protected].0
16+
uses: styfle/[email protected].1
1717
with:
1818
access_token: ${{ github.token }}
1919

2020
- name: Checkout
21-
uses: actions/checkout@v4
21+
uses: actions/checkout@v4.2.2
2222

2323
# Install dependencies
2424
- name: Install Graphviz
2525
run: |
2626
sudo apt-get install graphviz {lib,}graphviz-dev
2727
2828
- name: Set up Python 3.11
29-
uses: actions/setup-python@v4
29+
uses: actions/setup-python@v5.4.0
3030
with:
3131
python-version: "3.11"
3232
cache: "pip"
@@ -58,7 +58,7 @@ jobs:
5858
# Push the book's HTML to github-pages
5959
- name: GitHub Pages action
6060
if: github.ref == 'refs/heads/main'
61-
uses: peaceiris/actions-gh-pages@v3.9.3
61+
uses: peaceiris/actions-gh-pages@v4.0.0
6262
with:
6363
github_token: ${{ secrets.GITHUB_TOKEN }}
6464
publish_dir: ./_build/html

args.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ which is additionally annotated with genomic positions such that at each
2626
position, a path through the edges exists which defines a tree. This graph
2727
interpretation of a tree sequence maps very closely to the concept of
2828
an "ancestral recombination graph" (or ARG). See
29-
[this preprint](https://www.biorxiv.org/content/10.1101/2023.11.03.565466v2) for further details.
29+
[this paper](http://dx.doi.org/10.1093/genetics/iyae100) for further details.
3030

3131
## Full ARGs
3232

getting_started.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,10 @@ Throughout, we'll also provide pointers to where you can learn more.
3131

3232
:::{note}
3333
The examples in this
34-
tutorial are all written using the {ref}`tskit:sec_python_api`, but it's also possible to
35-
{ref}`use R<sec_tskit_r>`, or access the API in other languages, notably
36-
{ref}`C<sec_c_api>` and [Rust](https://github.com/tskit-dev/tskit-rust).
34+
tutorial are all written using the {ref}`tskit:sec_python_api`,
35+
but it's also possible to {ref}`use R<sec_tskit_r>`,
36+
or access the API in other languages,
37+
notably {ref}`C<sec_c_api>` and [Rust](https://github.com/tskit-dev/tskit-rust).
3738
:::
3839

3940
A number of different software programs can generate tree sequences. For the purposes

popgen.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ large genomic datasets.
9494

9595
Several simulation tools output tree sequences. Below we use the
9696
standard library for population genetic simulation models
97-
([stdpopsim](https://popsim-consortium.github.io/)) to generate a model of
97+
([stdpopsim](https://popsim-consortium.github.io/stdpopsim-docs/)) to generate a model of
9898
*Homo sapiens*, in which African, Eurasian,
9999
and Asian populations combine to generate a mixed American population. We can use the
100100
[demesdraw](https://pypi.org/project/demesdraw/) package to plot a schematic of the
@@ -107,7 +107,7 @@ import demesdraw
107107
from matplotlib import pyplot as plt
108108
109109
species = stdpopsim.get_species("HomSap")
110-
model = species.get_demographic_model("AmericanAdmixture_4B11")
110+
model = species.get_demographic_model("AmericanAdmixture_4B18")
111111
112112
# Plot a schematic of the model
113113
demesdraw.tubes(model.model.to_demes(), ax=plt.gca(), seed=1, log_time=True)
@@ -125,7 +125,7 @@ succinct tree sequence named `ts`:
125125
contig = species.get_contig("chr1", mutation_rate=model.mutation_rate, right=20_000)
126126
samples = {"AFR": 4, "EUR": 4, "ASIA": 4, "ADMIX": 4} # 16 diploid samples
127127
engine = stdpopsim.get_engine("msprime")
128-
ts = engine.simulate(model, contig, samples, seed=9)
128+
ts = engine.simulate(model, contig, samples, seed=9).trim() # trim to first 20kb simulated
129129
print(f"Simulated a tree sequence of {ts.num_samples} haploid genomes:")
130130
print(f"{ts.num_sites} variable sites over {ts.sequence_length} base pairs")
131131
```

requirements-CI.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ numpy==1.26.4
99
pandas==2.2.2
1010
pygraphviz==1.13
1111
scikit-allel==1.3.8
12-
stdpopsim==0.2.0
12+
stdpopsim==0.3.0
1313
tqdm==4.66.3
1414
tskit==0.5.8
1515
tskit_arg_visualizer==0.0.1

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ networkx
88
pandas
99
pygraphviz
1010
scikit-allel
11-
stdpopsim
11+
stdpopsim>=0.3
1212
tqdm
1313
tskit>=0.5.4
1414
tskit_arg_visualizer

viz.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,23 @@ the `tree` group contains the ID of the tree (e.g. `t0`), the `site` group on th
448448
contains the site ID (e.g. `s15`) the `mut` class contains the mutation ID (e.g. `m16`),
449449
and so on.
450450

451+
#### CSS selector quick reference
452+
453+
If you don't do this all the time it's not easy to remember what the various separators
454+
mean, so here's a quick reference (for more, see
455+
[these docs](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_selectors)):
456+
457+
- `abc` (Type `abc`, like `g` for a `<g>...</g>` tag)
458+
- `.xyz` (Class `xyz`)
459+
- `#uvw` (ID `uvw`)
460+
- `,` (Selector list, means "or")
461+
- `>` (Child combinator)
462+
- "` `" (Descendant combinator, a space)
463+
- `+` (Next-sibling combinator)
464+
- `~` (Subsequent sibling combinator)
465+
- `|` (Namespace separator)
466+
467+
451468
#### Styling graphical elements
452469

453470
The classes above make it easy to target specific nodes or edges in one or multiple
@@ -1134,7 +1151,6 @@ def make_introgression_ts(sequence_length, random_seed=None):
11341151
msprime.SampleSet(1, ploidy=1, time=30 * time_units, population='Neanderthal'),
11351152
],
11361153
demography = demography,
1137-
record_migrations=True, # Needed for tracking segments.
11381154
random_seed=random_seed,
11391155
)
11401156

0 commit comments

Comments
 (0)