simDrift: Simulate Drift

Description Usage Arguments Details Value Examples

Description

Simulate drift across a number of populations and generations, for a single allele

Usage

1
2
simDrift(f0, N0, Nt, t, n, mig, surv, litter, pops = c("same", "flip50",
  "flip100", "fixed", "absent"), sd = 0, genoProbs = c(1, 1, 1), ...)

Arguments

f0

The allele frqeuency pre-bottleneck

N0

The effective population size pre-bottleneck

Nt

The effective population size after 't' generations

t

The number of generations

n

The number of populations

mig

The migration rate

surv

The survival rate at the original population bottleneck

litter

The litter size at each generation

pops

Specify the method for generating f0 in surrounding populations. Choosing pops = "same" gives neighbouring populations with the same starting frequency. Choosing pops = "flip50" gives neighbouring populations where allele frequencies are flipped between 0.5 and 1, such that if f0 = 0.55, in neighbouring populations it will be given f0 = 0.95. Choosing pops = "flip100" gives neighbouring populations with allele frequencies flipped between 0 and 1, such that if f0 = 0.55, neighbouring populations will be given f0 = 0.45. Choosing either pops = "fixed" or pops = "absent" will set the alleles to be strictly fixed or absent in the neighbouring populations.

sd

The variability of allele frequencies in neighbouring populations around the central population.

genoProbs

A vector of length three indicating the selective advantage for each genotype. Should be specified as relative probabilities and defaults to the vector c(1, 1, 1), giving an equal probability of selection to each genotype. By way of example, a 20% fitness increase for a homozygous reference allele could be given the vector c(1.2, 1, 1).

Details

Starting with the initial population size, which is equal across all populations, all populations are subject to the same bottleneck with survival probability as given in the argument surv. Populations are grown exponentially until reaching Nt, and despite the given litter-size, only the appropriate number will be allowed to breed at each generation.

By default, all neighbouring populations will be given the same initial frequency as the central population. These can be varied around this value on the logit scale using the parameter sd. Choosing values such as sd < 0.5 will give moderate variability around the starting frequency, whilst values near one will clearly spread the allele frequencies more widely across the entire range. Extreme values such as sd = 100 will give alleles which are effectively either fixed or absent in the neighbouring populations with equal probability.

Value

A list with components ft and nEff. These denote the final allele frequency, and the effective populations sizes at each generation respectively.

Examples

1
test <- simDrift(f0 = 0.8, N0 = 100, Nt = 200, t = 10, n = 6, mig = 0.01, surv = 0.1, litter= 6)

steveped/driftSim documentation built on May 30, 2019, 5:38 p.m.