A R-package that simulates the behavior of population genetics according to the Wright-Fisher Model. It assumes a diploid population with two possible alleles. Using that simulation, grafics can be generated. They show the evolution of different realizations from a given starting point. One focuses on the number of the alleles, another one on the variance between the realizations, and the third one the heterozygosity.
You can install the package in R via
devtools::install_git("https://github.com/johschnee/WrightFisherSimulation.git")
.
library(WrightFisherSimulation)
init(N = 50, X0 = 50, realizations = 50, gens = 400)
p <- simulation()
graphic_individuals(p)
graphic_variance(p)
graphic_heterozygosity(p)
V. Hösel, C. Kuttler, J. Müller. Mathematical Population Genetics and Evolution of Bacterial Cooperation, Word Scientific Press, Singapore, 2020, pp. 26-36.