genetic.drift: Genetic drift simulation

Description Usage Arguments Value Author(s) See Also Examples

Description

This function simulates genetic drift at a biallelic genetic locus with no selection and no mutation in a sexually reproducing diploid population or set of populations.

Usage

1
	genetic.drift(p0=0.5,Ne=20,nrep=10,time=100,show="p",pause=0.1)

Arguments

p0

Starting frequency for the A allele.

Ne

Effective population size.

nrep

Number of replicate simulations.

time

Total time, in number of generations, for the simulation.

show

Various options for plotting. "p" shows the frequency of the A allele through time; "genotypes" creates an animated histogram with the frequencies of each of the three genotypes through time; "fixed" shows the fraction of populations that have fixed for each allele, a or A; "heterozygosity" plots the mean heterozygosity and the expected heterozygosity through time. The default is show="p".

pause

Pause between generations. pause=0.01 (for instance) might smooth animation.

Value

The function creates one of several possible plots, depending on the value of show.

Author(s)

Liam Revell liam.revell@umb.edu

See Also

founder.event, selection

Examples

1
2
	genetic.drift()
	genetic.drift(p0=0.7,show="heterozygosity")

KlausVigo/popgenSim documentation built on May 8, 2019, 5:38 p.m.