popGenEqns: Population Genetics Equations

Description Usage Arguments Details Value Author(s) References Examples

Description

Collection of classical population genetics equations.

Usage

1
2
3
4
5
6
7
wrightFst(Ne, dispersal, gen.time, ploidy)

numGensEq(fst, Ne, gen.time)

fstToNm(fst, ploidy)

expectedNumAlleles(n, theta, ploidy)

Arguments

Ne

Effective population size.

dispersal

Migration rate in terms of probability of an individual migrating in a generation.

gen.time

Number of generations since ancestral population.

ploidy

Ploidy of the locus.

fst

value of Fst at equilibrium.

n

Sample size.

theta

Product of effective population size (Ne) and mutation rate (mu).

Details

wrightFst

Calculate Wright's Fst from Ne, dispersal, and generation time.

numGensEq

Calculate the number of generations to equilibrium based on a an ideal Wright model.

fstToNm

Calculate Nm (number of migrants per generation) for a given value of Fst.

expectedNumAlleles

Calculate the expected number of alleles in a sample of a given size and value of theta.

Value

wrightFst
numGensEq
fstToNm
expectedNumAlleles

a two element vector with the expected number of alleles (num.alleles) and variance (var.num.alleles).

Author(s)

Eric Archer eric.archer@noaa.gov

References

Ewens, W. 1972. The sampling theory of selectively neutral alleles. Theoretical Population Biology 3:87-112. Eqns. 11 and 24.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
dispersal <- seq(0.05, 0.8, by = 0.05)
fst <- wrightFst(100, dispersal, 20, 2)
plot(dispersal, fst, type = "l")

numGensEq(0.15, 100, 20)
numGensEq(0.3, 100, 20)
numGensEq(0.15, 50, 20)

fst <- seq(0.001, 0.2, length.out = 100)
Nm <- fstToNm(fst, 2)
plot(fst, Nm, type = "l")

expectedNumAlleles(20, 1, 2)
# double the samples
expectedNumAlleles(40, 1, 2)
# for a haploid locus
expectedNumAlleles(40, 1, 1)
# double theta
expectedNumAlleles(40, 2, 1)

strataG documentation built on Feb. 28, 2020, 9:07 a.m.