mutation.selection: Gene frequencies over time under mutation-selection balance

Description Usage Arguments Value Author(s) See Also Examples

View source: R/popgen.R

Description

This function performs numerical analysis of mutation-selection balance with mutation from A to a and selection against (either or both of) Aa and aa.

Usage

1
2
	mutation.selection(p0=1.0, w=c(1,0), u=0.001, time=100, show="q", pause=0, 
		ylim=c(0,1))

Arguments

p0

Starting frequency for the A allele.

w

Fitnesses of the heterozygote (Aa) and homozygote deleterious (aa) genotypes. The fitness of genotype AA is assumed to be 1.0.

u

Rate at which A alleles are converted to a alleles by mutation.

time

Number of generations to run the analysis.

show

Two options for plotting. "q" shows the frequency of a through time; "fitness" plots the mean fitness over time. The default is show="q".

pause

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

ylim

Limits on the y-axis for plotting.

Value

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

The function also invisibly returns the frequency of the A allele through time and the mean population fitness as an object of class "mutation.selection" that can be printed or re-plotted with associated print and plot methods, respectively. The plot method also permits user control over various attributes of the appearance of the plot, such as the color of the plotted lines (color), the line widths (lwd), the limits of the y-axis (ylim), and the type of line (e.g., "l" vs. "s", via the argument type).

Author(s)

Liam Revell liam.revell@umb.edu

See Also

genetic.drift, selection

Examples

1
	mutation.selection(w=c(1,0),time=100,ylim=c(0,0.1))

Example output



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