Skip to content

Commit

Permalink
fix #262, switch recipes to sim_ancestry()
Browse files Browse the repository at this point in the history
  • Loading branch information
bhaller committed Feb 12, 2022
1 parent 4220d59 commit 42b9aad
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import msprime, pyslim

ts = msprime.simulate(sample_size=10000, Ne=5000, length=1e8,
mutation_rate=0.0, recombination_rate=1e-8)
ts = msprime.sim_ancestry(samples=5000, population_size=5000,
sequence_length=1e8, recombination_rate=1e-8)
slim_ts = pyslim.annotate_defaults(ts, model_type="WF", slim_generation=1)
slim_ts.dump("recipe_17.8.trees")
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import msprime, pyslim, random
import numpy as np

ts = msprime.simulate(sample_size=10000, Ne=5000, length=1e8,
mutation_rate=0.0, recombination_rate=1e-8)
ts = msprime.sim_ancestry(samples=5000, population_size=5000,
sequence_length=1e8, recombination_rate=1e-8)

tables = ts.dump_tables()
pyslim.annotate_defaults_tables(tables, model_type="nonWF", slim_generation=1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import msprime, pyslim

ts = msprime.simulate(sample_size=10000, Ne=5000, length=1e8,
mutation_rate=0.0, recombination_rate=1e-8)
ts = msprime.sim_ancestry(samples=5000, population_size=5000,
sequence_length=1e8, recombination_rate=1e-8)
slim_ts = pyslim.annotate_defaults(ts, model_type="WF", slim_generation=1)
slim_ts.dump("recipe_17.8.trees")
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import msprime, pyslim, random
import numpy as np

ts = msprime.simulate(sample_size=10000, Ne=5000, length=1e8,
mutation_rate=0.0, recombination_rate=1e-8)
ts = msprime.sim_ancestry(samples=5000, population_size=5000,
sequence_length=1e8, recombination_rate=1e-8)

tables = ts.dump_tables()
pyslim.annotate_defaults_tables(tables, model_type="nonWF", slim_generation=1)
Expand Down
1 change: 1 addition & 0 deletions VERSIONS
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ development head:
get rid of a spurious self-test error that happened occasionally due to changed to relatedness(); the test itself was wrong (#269)
fix the appearance of SLiMgui profile output when in dark mode (#270)
advance copyrights to 2022
fix recipes 17.8 and 17.9 to use sim_ancestry() instead of simulate()


version 3.7 (Eidos version 2.7)
Expand Down

0 comments on commit 42b9aad

Please sign in to comment.