This model simulates the genetics of finite populations of a diploid organism with one diallelic locus
that codes for color.
The alleles are R which codes for red pigment and B which codes for blue pigment.
Individuals with genotype RR are red, genotype BB is blue, and heterozygotes are purple.
The model can apply natural selection against any of the genotypes allowing the user to simulate
selection for a dominant or recessive allele, as well as scenarios of overdominance and underdominance.
Model Parameters
The user can set the value of the following parameters:
Population Size (N): This is the number of individuals in each simulated
population.
Initial Red Frequency: This parameter allows the user to set the initial frequencey
of the R allele.
Simulation Length: This is the number of generations to simulate.
Number of Simulations: The number of replicate simulations to run. The user can run
up to 100 simulations at a time.
Selection Against Red: The selection coefficient against the red (RR) genotype.
Selection Against Purple: The selection coefficient against the purple (RB)
genotype.
Selection Against Blue: The selection coefficient against the blue (BB) genotype.
Model Interface
To use the model, the user first inputs the desired parameter values as described above.
To run the simulation(s), press the Run Simulation button.
The p̄ output shows the mean final value of the R allele across all replicate
simulations.
The s button shows the standard deviation of ending R allele frequencies across all
replicate simulations.
The Red and Blue Fixations outputs show the number of simulations in which the R
and B alleles went to fixation (reached 100% frequency).
The Polymorphic output is the number of simulations in which neither allele went to
fixation.
The plot shows the evolution of the frequency of the R allele in each replicate simulation.
The red traces are individual populations.
The black trace shows the average value of the frequency of R over all replicate
simulations.
The user can save a low-resolution PNG image of the plot window by clicking on the camera
icon which appears when the mouse cursor is over the plot.
The user can also save a high resolution image by clicking the Save high-resolution
PNG button. The image will be saved to your downloads folder.
The user has an option to save the simulation results to a csv file.
The columns in the output file are the frequencies of the R allele at each generation for each
replicate simulation.