Wright Fisher forward time simulation with discrete generation feature #2254
Replies: 1 comment 2 replies
-
Hi @NiharaDeSilva, In the next line of code you sprinkled mutations along the branches of all local trees. Applying a start and end time here will therefore only affect the mutation process. (See the documentation linked above on how to set the duration on the I hope this clarifies at least some of the questions you had. |
Beta Was this translation helpful? Give feedback.
-
I am trying to use msprime to simulate populations. I would like to know whether msprime supports forward time simulation of Wright-Fisher model along with the discrete generation feature where i could simulate the populations for a given duration range(eg: 2,8) . According to the documentation of msprime, it supports discrete backwards-time Wright-Fisher model. However I have written the following code to simulate populations with discrete forward time Wright-Fisher model
Really appreciate if this could be clarified.
tree_sequence = msprime.sim_ancestry(samples=sample_size, model=”dtwf”, ploidy=2, recombination_rate=1e-8, population_size=effective_population, sequence_length=loci, random_seed=42)
tree_sequence = msprime.sim_mutations(tree_sequence, start_time=2, end_time=8, rate=rate, random_seed=42)
Beta Was this translation helpful? Give feedback.
All reactions