This method schedules a mutant mutation
Details
The mutation can occur from any of the species of the source mutant to the species of the destination mutant with a consistent epigenetic state. For the sake of example, if the mutation from "A" to "B" is scheduled, then we have three possible situations:
The mutant "A" consists of the only species "A". Then, during one duplication of a cell of "A", one cell of "B" will arise.
The mutant "A" consists of the species "A+" and "A-" and during one duplication of a cell of "A+", one cell of "B+" will arise.
The mutant "A" consists of the species "A+" and "A-" and during one duplication of a cell of "A-", one cell of "B-" will arise. No other scenario can occur.
Examples
# set the seed of the random number generator
set.seed(0)
# create a simulation
sim <- SpatialSimulation()
sim$add_mutant(name = "A",
epigenetic_rates = c("+-" = 0.01, "-+" = 0.01),
growth_rates = c("+" = 0.2, "-" = 0.08),
death_rates = c("+" = 0.1, "-" = 0.01))
sim$add_mutant(name = "B",
epigenetic_rates = c("+-" = 0.02, "-+" = 0.01),
growth_rates = c("+" = 0.3, "-" = 0.1),
death_rates = c("+" = 0.1, "-" = 0.01))
# schedule an evolution from mutant "A" to mutant "B" at time 50
sim$schedule_mutation(src = "A", dst = "B", time = 50)