@@ -94,7 +94,7 @@ large genomic datasets.
94
94
95
95
Several simulation tools output tree sequences. Below we use the
96
96
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
98
98
* Homo sapiens* , in which African, Eurasian,
99
99
and Asian populations combine to generate a mixed American population. We can use the
100
100
[ demesdraw] ( https://pypi.org/project/demesdraw/ ) package to plot a schematic of the
@@ -107,7 +107,7 @@ import demesdraw
107
107
from matplotlib import pyplot as plt
108
108
109
109
species = stdpopsim.get_species("HomSap")
110
- model = species.get_demographic_model("AmericanAdmixture_4B11 ")
110
+ model = species.get_demographic_model("AmericanAdmixture_4B18 ")
111
111
112
112
# Plot a schematic of the model
113
113
demesdraw.tubes(model.model.to_demes(), ax=plt.gca(), seed=1, log_time=True)
@@ -125,7 +125,7 @@ succinct tree sequence named `ts`:
125
125
contig = species.get_contig("chr1", mutation_rate=model.mutation_rate, right=20_000)
126
126
samples = {"AFR": 4, "EUR": 4, "ASIA": 4, "ADMIX": 4} # 16 diploid samples
127
127
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
129
129
print(f"Simulated a tree sequence of {ts.num_samples} haploid genomes:")
130
130
print(f"{ts.num_sites} variable sites over {ts.sequence_length} base pairs")
131
131
```
0 commit comments