test.params-class: Set parameters for coalescent simulations with Hudson's MS...

Description Arguments Author(s) See Also Examples

Description

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.

Arguments

theta

mutation parameter theta (4Nmu), where N is the diplod effective population size and mu the mutation rate per locus. It needs to be provided as a vector of length n.regions

seeds

specify 3 random number seeds. a vector of length 3 with positive integer values is expected

fixedSegsites

usually the number of segregating sites varies in each iteration. Please provide a single numeric value if the number of segregating sites needs to be fixed.

recombination

provide a vector of format: c(p, nsites), p = cross-over parameter rate, nsites is the number of sites between which recombination occurs

geneConv

in addition to recombination, intra-locus non-cross-over exchange gene conversion can be included in the simulation; the expected format is c(f, gamma), where f denotes the ratio g/r (r is the probability per generation of crossing-over between adjacent sites (see Wiuf and Hein 2000), and gamma is the mean conversion tract length.

growth

population size is assumed to be $N(t) = N0 exp^alpha*t$. Provide alpha as an integer value. Negative values indicate that population was larger in the past than present, positive values indicate that it was smaller.

migration

specify the migration rate between populations. Please provide a single numeric value.

demography

vector of length 3 or 4 with first value denoted as 'type'
valid 'types' for vectors of length 3 are as follows:
- 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)

Author(s)

Bastian Pfeifer

See Also

MS

Examples

1
2
3
# params           <- new("test.params")
# params@theta     <- rep(5,n.regions)
# params@migration <- 3

PopGenome documentation built on Feb. 1, 2020, 1:07 a.m.