Usage
simulatepopulation(m.rate, runtime, equi.pop, sample.times, n.samples=1,
genomelength=100000, shape=flat, bottle.times=0, bottle.size=1, full=FALSE,
feedback=1000, init.freq=1, libr=NULL, nuc=NULL, ref.strain=NULL, ...)
Arguments
m.rate
Mutation rate (per sequence per generation).
runtime
Number of generations for simulation to run.
equi.pop
Equilibrium effective population size of pathogens within-host.
sample.times
Vector of times at which to sample population.
n.samples
Number of samples to take at each sampling point (if deepseq=FALSE).
genomelength
Length of genome.
shape
Function describing the population growth dynamics. See Details.
bottle.times
Vector of population bottleneck times.
bottle.size
Size of population bottleneck (if bottle.times!=0).
full
Should complete samples (all genotypes and their frequencies) be returned?
feedback
Intervals between R feedback on simulation progress.
init.freq
Vector of initial frequencies of genotypes, if initial population should be specified. By default, the population grows from a single, randomly generated genotype.
libr
Initial list of genotypes, if initial population should be specified. Must have same length as init.freq.
nuc
Initial list of mutations, if initial population should be specified. Must have same length as init.freq.
ref.strain
Reference strain. By default, this is randomly generated.
...
Additional arguments to be passed to the shape function.