founder.event: Simulation of a founder event or population bottleneck

Description Usage Arguments Value Author(s) See Also Examples

View source: R/popgen.R

Description

This function simulates genetic drift with a founding event / population bottleneck at time etime.

Usage

1
	founder.event(p0=0.5, Ne=1000, Nf=10, ttime=100, etime=50, show="p", ...)

Arguments

p0

Starting frequency for the A allele.

Ne

Effective population size at the start of the simulation and after the founding event.

Nf

Size of the founding population.

ttime

Total time of the simulation.

etime

Time for the founding event. Can either be a single generation, or a sequence of generations (e.g., etime=40:50) for a prolonged founder event. Note that to simulate a prolonged bottleneck the user must supply the sequence of generations during which the population is to be bottlenecked and not merely the start and end times of the bottleneck.

show

Two different options for plotting. "p" shows the frequency of the A allele through time; "var" shows the genetic variation in the population, calculated as p*(1-p). The default is show="p".

...

optional arguments. Presently, the only optional argument in founder.event is ltype which specifies the line type and defaults to "s".

Value

The function creates one of two different plots, depending on the value of show.

The function also invisibly returns an object of class "founder.event" which can be printed or plotted using corresponding print and plot methods. (See examples.)

Author(s)

Liam Revell liam.revell@umb.edu

See Also

drift.selection, genetic.drift

Examples

1
2
3
4
	founder.event()
	p<-founder.event(show="variation")
	print(p)
	plot(p,show="p",ltype="l")

Example output

Object of class "founder.event" consisting of 100
total generations, including a bottleneck of 1
generations.
The simulation had an effective population size of 1000
and a founder population size of 10.

To plot enter plot('object_name') at the command line
interface.

learnPopGen documentation built on May 21, 2019, 1 a.m.