Description Usage Arguments Details Value Author(s) References Examples
Collection of classical population genetics equations.
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)
|
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). |
Calculate Wright's Fst from Ne, dispersal, and generation time.
Calculate the number of generations to equilibrium based on a an ideal Wright model.
Calculate Nm (number of migrants per generation) for a given value of Fst.
Calculate the expected number of alleles in a sample of a given size and value of theta.
a two element vector with the expected number of alleles
(num.alleles
) and variance (var.num.alleles
).
Eric Archer eric.archer@noaa.gov
Ewens, W. 1972. The sampling theory of selectively neutral alleles. Theoretical Population Biology 3:87-112. Eqns. 11 and 24.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.