Allele frequency and ancestral estimate evolution
loading animation frames...

Plots

Evolution of 12 populations at 1000 loci were simulated. Since we are simulating SNP data, there are only 2 alleles for each locus: red or blue. Thus we can plot just the blue allele frequency (B), which implies red allele frequency (R=1-B). For each locus, each of the 12 populations starts at the same allele frequency and evolves independently. The upper left plot shows allele frequency for a single locus over time, marking the current time with a vertical black line, and the ancestral allele frequency with a grey line. On the bottom, we see the current allele frequency for all loci at this time, stratified by selection type and strength. Black dots mark the ancestral allele frequency and a vertical black line marks the locus shown in the upper left plot. In the upper right, we attempt to estimate the ancestral allele frequency by taking the mean of the current allele frequencies of all 12 populations. A circle highlights the locus that appears in the upper left plot.

Simulation

The allele frequency changes in each generation via 2 mechanisms: drift and selection. Drift introduces some random variability up or down in allele frequency, independent of population color. Selection depends on the color of the population, and the type of selection. For loci not under selection (none) and populations of neutral color, there is no allele frequency change due to selection (since presumably there is no selective pressure). For loci under positive selection, blue alleles will be favored in blue populations, and disfavored in red populations (and vice versa). For loci under balancing selection, it is advantageous to have both a blue and red allele in a population that is either blue or red.