This function will execute a built-in msprime script and run a compiled slendr demographic model.
msprime(
model,
sequence_length,
recombination_rate,
output = file.path(model$path, "output_msprime.trees"),
sampling = NULL,
verbose = FALSE,
random_seed = NULL,
save_sampling = TRUE
)
Model object created by the compile
function
Total length of the simulated sequence (in base-pairs)
Recombination rate of the simulated sequence (in recombinations per basepair per generation)
Path to the output tree sequence
A data frame of times at which a given number of individuals
should be remembered in the tree-sequence (see sampling
for a
function that can generate the sampling schedule in the correct format). If
missing, only individuals present at the end of the simulation will be
recorded in the tree-sequence output file.
Write the SLiM output log to the console (default
FALSE
)?
Random seed (if missing, SLiM's own seed will be used)
Save the sampling schedule table together with other
output files? If FALSE
(default), the sampling table will be saved
to a temporary directory.
if (FALSE) # run a simulation using the msprime back end from a compiled slendr model object
msprime(model, sequence_length = 100e6, recombination_rate = 1e-8, method = "batch", verbose = TRUE)