View source: R/tree-sequences.R
ts_mutate | R Documentation |
Add mutations to the given tree sequence
ts_mutate(
ts,
mutation_rate,
random_seed = NULL,
keep_existing = TRUE,
mut_type = NULL
)
ts |
Tree sequence object of the class |
mutation_rate |
Mutation rate used by msprime to simulate mutations |
random_seed |
Random seed passed to msprime's |
keep_existing |
Keep existing mutations? |
mut_type |
Assign SLiM mutation type to neutral mutations? If
|
Tree-sequence object of the class slendr_ts
, which serves as
an interface point for the Python module tskit using slendr functions with
the ts_
prefix.
ts_nodes
for extracting useful information about
individuals, nodes, coalescent times and geospatial locations of nodes on a
map
init_env()
# load an example model with an already simulated tree sequence
slendr_ts <- system.file("extdata/models/introgression_slim.trees", package = "slendr")
model <- read_model(path = system.file("extdata/models/introgression", package = "slendr"))
ts <- ts_load(slendr_ts, model)
ts_mutate <- ts_mutate(ts, mutation_rate = 1e-8, random_seed = 42)
ts_mutate
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.