Add mutations to the given tree sequence

ts_mutate(
ts,
mutation_rate,
random_seed = NULL,
keep_existing = TRUE,
mut_type = NULL
)

## Arguments

ts

Tree sequence object of the class slendr_ts

mutation_rate

Mutation rate used by msprime to simulate mutations

random_seed

Random seed passed to msprime's mutate method

keep_existing

Keep existing mutations?

mut_type

Assign SLiM mutation type to neutral mutations? If NULL (default), no special mutation type will be used. If an integer number is given, mutations of the SLiM mutation type with that integer identifier will be created.

## Value

Tree sequence object of the class slendr_ts

ts_nodes for extracting useful information about individuals, nodes, coalescent times and geospatial locations of nodes on a map
if (FALSE) {