Set parameters for coalescent simulations with Hudson's MS and Ewing's MSMS.
The object that contains the set parameter values can be passed to the function MS. This class simpliifes the process of passing on all necessary values to the MS function.
1
set a growth rate change alpha at a certain time t:
c(1, t, alpha) - 2
set all sub-populations to size $x * N_0$ and growth rate to zero:
c(2, t, x)
- 3
set all elements of the migration matrix to $x/(npop-1)$:
c(3, t, x)
valid 'types' for vectors of length 4 are as follows:
- 4
set growth rate of sub-population i to alpha at time z:
c(4, t, i, alpha)
- 5
set sub-population i size to $x * N_0$ at time t and growth rate to zero:
c(5, t, i, x)
- 6
split sub-population i into sub-population i and a new sub-population,
labeled npop + 1. Each ancestral lineage in sub-population i is randomly
assigned to sub-population i with probability p and sub-population
npop + 1 with probability 1 - p. The size of sub-population npop + 1 is
set to $N_0$. Migration rates to and from the new sub-population are assumed
to be zero and the growth rate of the new sub-population is set to zero:
c(6, t, i, p)
- 7
move all lineages in sub-population i to sub-population j at time t.
Migration rates from sub-population i are set to zero:
c(7, t, i, j)
# params <- new("test.params")
# params@theta <- rep(5,n.regions)
# params@migration <- 3
Run the code above in your browser using DataLab