Natural Selection on a Diallelic Locus

This module simulates the deterministic process of natural selection acting on the three genotypes present at a one locus with two alleles. The module displays the results of natural selection on four plots: genotype frequency over time, frequency of the A allele over time, population mean fitness (w-bar) over allele frequency, and change in the frequency of the A allele (Δp) over allele frequency.

User-entered parameters are the initial genotype frequencies “P(AA)” and “P(Aa)” (P(aa) is determined by subtraction since the genotype frequencies sum to one), the relative fitness values of each genotype, and the number of generations to simulate.

Using the relative fitness values, the user can set the model to directional selection, balancing selection, or disruptive selection. For example, relative fitness values of w1 = 1, w2 = 1.5 and w3 = 1 correspond to an over-dominance model of relative fitness that produces balancing selection.

The genotype frequency over time plot shows how selection acts on genotypes based on their relative fitness values. This genetic change is frequently summarized by plotting frequencies of the A allele over time, even though alleles do not have fitnesses (in most cases) and selection does not act directly on alleles.

The plot of population mean fitness (w-bar) over allele frequency shows where mean fitness is highest. This explains why natural selection attains a given set of equilibrium genotype frequency values.

The plot of change in the frequency of the A allele (Δp) over allele frequency shows how rapidly allele frequency changes and whether allele frequency is increasing or decreasing. Δp values of zero identify equilibrium allele frequency points since allele frequencies are not changing at those population allele frequency points.

For more background, see chapter 6 in Hamilton, 2009.

Initial genotype frequencies
p(AA):
p(Aa):
p(aa):
Relative fitness values (w)
wAA:
wAa:
waa:
Generations to simulate
 
Natural Selection Plot