About Evo
Welcome to the population genetics simulation known as Evo. This simulation is designed to help you further understand population genetics and how underlying forces such as natural selection and climate stability play a role in varying populations. This simulation was inspired by field work done on snowshoe hares in Montana. These animals were found to have genes that cause them to seasonally change from white to brown to match the color of the ground as snow melts. Field researchers found that for each week a hare's coat mismatched it's environment, it was 7% less likely to survive natural selection due to predation (e.g. owls and foxes). These are the default values used in the simulation but can be modified for the sake of experimentation.
To help us understand population genetics, this simulation by default starts with a hypothetical population containing 4 equally abundant alleles (A.wk.15, A.wk.24, A.wk.26, A.wk.35). The number in each allele indicates the week of the year a homozygote will switch its coat from white to brown.
There are six separate simulations each one focusing on variances in size of population, stability of the climate or the presence of natural selection. Each simulation tracks the hypothetical population of hares and their four alleles as they evolve over time. Any changes to the variables mentioned above, can have an impact on the evolution of the population of hares. When running the simulation you'll find a graph presenting the change of allele frequencies over time and a graph presenting the change in the week of snow melt for each year in the simulation. There is also a grid which has a box element for each hare with their current state in the given week of the simulation. Use both of these graphs to analyze trends and look at any underlying forces producing the allele frequencies you see. Just like in the biosphere, chance events like random mating and the success of individual animals will play a role in how these simulated populations evolve. Feel free to run each simulation as many times as you want to better understand these things.
Controls
The simulation can be played in multiple ways via timesteps, as there are a few different controls that you can use to interact with the simulation. Below is a list of the controls and their functions.
Simulation Controls
These controls are used to interact with the simulation itself.
Timestep interval
This controls the amount of time that will be simulated with each step in the simulation. The default value is 1 year and can also be changed to use weeks or generations.
Max number of timesteps
The maximum number of timesteps dictates how many timesteps the simulation will produce after pressing play. If all the hares die before this maximum, the simulation will stop. For example: A timestemp interval of 1 year with 50 for maximum number of timesteps, the simulation will play until 50 years have been simulated or all hares have died.
Playback speed
This controls the speed at which the simulation will play back in milliseconds, i.e. the time between each timestep. This ranges from 100ms to 2500ms.
| Button | Description |
|---|---|
| Reset | Resets the simulation to the beginning of the current configuration. |
| Play/Pause | Toggles playback of the simulation. Pausing does not reset the number of timesteps that have been executed so far. |
| Stop | Stops playback and resets the number of timesteps that have passed. |
Visualizations
There are three main visualizations that are used to help you understand the simulation. Below is a description of each of the visualizations and how they can be used to analyze the data.
Allele Frequency Graph
Displays the relative frequency data of the alleles in the population per week with the y-axis representing the frequency from 0.0 to 1.0, and the x-axis representing the week (labeled as the year and week of the year). The graph can be toggled to show an area chart which will cause the allele frequencies to stack on top of each other to show the total frequency of all alleles in the population.
| Button | Description |
|---|---|
| Area | Toggles the graph between a line chart and an area chart. |
| Ticks | Toggles the ticks on the x-axis between generations and years/weeks |
Genotype Grid
The genotype grid contains a small box for each hare present in the simulation. The left side of the box has two sections, both which display the genotypic coloring of the alleles possessed by the hare. The right side is a representation of the current whitness of the hare. Each box can be hovered for additional information of the hare, including the allele names, the exact whiteness percentage, its status of being alive, and if it is currently mistmatched
As the simulation progresses, the boxes will be stylized differently to represent various states of the hares.
Note: The following examples do not have hover functionality.
Alive
Dead
Alive, Mismatched
Dead, Mismatched
- Orange outline: The alive hare is mismatched with its environment.
- Red outline: The hare died while being mismatched.
- Inner black outline, lowered opacity: The hare is dead.
Once dead, a hare will no longer update, meaning hares that die while being mismatched will correctly display this information without considering the current environment. When a new generation begins, all dead hares are swept and replaced with the new ones.
A weather bar displaying the current snow coverage and its associated color is provided for convenience at the top of the grid.
Snow Coverage Graph
By default, the snow coverage graph displays the first week the simulation experiences snowless coverage in a year, with the y-axis representing the week of the year and the x-axis representing the year. The graph can be toggled to show the snow coverage for each week of the years which is available due to the simulations ability to work with more complicated climates than the defaults.
| Button | Description |
|---|---|
| Type | Toggle between showing per-week snow coverage and first snowless week data |
Configuration
Even though here are default preset values for the simulation, you can also modify them yourself. Below is a explanation of each of the variables you can modify from the configuration panel.
| Variable | Description |
|---|---|
| Carrying Capacity | The maximum number of hares that can be supported by the environment. When a new generation occurs in a week, the population will repopulate to this number. |
| Base Survival Rate | The base survival rate of hares in the environment. This is the rate at which hares survive predation and other factors that would cause them to die. |
| Simulate Allele Selection | Whether or not the coat colors of the hares will cause them to be more or less likely to survive. If this is set to true, a penalty will be invoked for hares with coats that exert a contrast greater than 60% compared against the mean snow coverage. |
| Mismatch Penalty | The aforementioned penalty applied to hares that do not match their environment. This penalty is applied to the base survival rate of hares, a 0 or negative value guarantees the hare will not survive. |
| Allele Set | The set of alleles that will be used in the simulation. |
| Climate Function | The function used to determine the snow coverage for each week of the year. See the climate function section for more details. |
| Generation Function | The function used to determine when the population will repopulate. See the generation function section for more details. |
| Use a Random Seed | Whether or not the simulation will be completely random. If it is set to false, a seed can be provided to generate the same results each time the simulation is run in the same environment. |
| Random Seed | The seed used to generate the random numbers for the simulation. This can be a string, meaning any amount of characters or spaces is a valid seed. |
| Start Week | The week of the year the simulation will start on. This can be any number between 0 and 51. |
Exporting Data
At any point in the simulation, you can export simulation data in various formats through the export button found at the bottom right corner of the charts. Downloading will export as a file automatically while new tab will open the data temporarily in a new tab, which does not persist after you've left the website.
PNG
The currently shown chart as a transparent PNG image. The colors will match the current theme of the website.
JPEG
The currently shown chart as a JPEG image with a solid colored background. The colors will match the current theme of the website.
JSON
All data related to the simulation in a JSON format. This includes the configuration, the simulation which also contains the currently alive hares, alleleGraphDatasets, rawSnowData, rawFirstSnowlessWeekData, and rawPopulationData. Any time related data is sorted in order and is on a per week basis with the exception of the rawFirstSnowlessWeekData which is on a per year basis.
CSV
Exports time-based simulation data as a CSV file. The first line is a header for the Year, Week, Generation, Population Size, Snow Coverage, and a column for each allele's frequency
Advanced Configuration
If you have chosen to run this simulation locally, you may have noticed the sim.config.js file. This has been explained in the README, but here are its specifications.
alleleSets
This is an array containing sets of allele objects. The name of the set can be referenced in presets/scenarios. Each allele should have the following properties, though a question mark indicates that the property is optional:
| Property | Type | Description |
|---|---|---|
| id | Integer | Unique identifier for the allele. |
| name | String | Friendly display name of the allele. |
| type | String | The type of the allele. Currently, coat alleles are used. |
| brownWeek | Integer | Week of the year a homozygote will switch its coat from white to brown. |
| brownRate | Float | Decimal rate at which a homozygote will switch its coat from white to brown, with 1 being instant. |
| whiteWeek | Integer | Week of the year a homozygote will switch its coat from brown to white. |
| whiteRate | Float | Decimal rate at which a homozygote will switch its coat from brown to white, with 1 being instant. |
| geneColor? | Hex RGB String | Color of the allele when displayed across the simulation. |
scenarios
This is an array containing sets of scenario objects. These will be displayed in the preset panel of the simulation. The scenario should have a name, description, and options object. The options object should contain the following properties, though a question mark indicates that the property is optional:
| Property | Type | Description |
|---|---|---|
| selection | Boolean | Whether or not selection should be enabled |
| startWeek | Integer | Week of the year the simulation will start on. |
| availableAlleles | String | Name of the allele set to use for the simulation. |
| carryingCapacity | Integer | Maximum number of hares that can be supported by the environment. |
| baseSurvivalRate | Float | Base survival rate of hares in the environment. |
| mismatchPenalty | Float | Penalty applied to hares that do not match their environment. |
| climateGenerator | String | Name of the climate function to use for the simulation. |
| generationGenerator | String | Name of the generation function to use for the simulation. |
| seed? | String | Seed used to generate the random numbers for the simulation. If not provided, a random seed will be used. |
Climate Functions
Climate functions are used to determine the snow coverage for each week of the year. Below are the available climate functions and their descriptions.
| Name | Config String | Description |
|---|---|---|
| Integral Stable | IntegralStableClimate | Every year, the first snowless day will fall within +/- 1 of a randomly chosen base week between 21 and 28. Snow coverage will only be 0% or 100%. |
| Integral Warming | IntegralWarmingClimate | The first snowless day of the year drifts towards 0, slowing as it approaches it. Initial week starts around 30. Snow coverage will only be 0% or 100%. |
| Realistic Stable | RealisticStableClimate | Similar to its integral counterpart, but snow coverage is decimal. |
| Realistic Warming | RealisticWarmingClimate | Snow coverage is decimal and drifts, on average, considerably slower than its integral counterpart. |
Generation Functions
Generation functions are used to determine when the population will repopulate. Below are the available generation functions and their descriptions.
| Friendly Name | Config String | Description |
|---|---|---|
| Every 18 Weeks | GenerateEvery18Weeks | A new generation spawns every 18 weeks. |
References and Acknowledgements
Authors
This simulation's implementation was primarily developed and led by Zachary Mullen with additional input from Rena Ahn, Gina Philipose and mentorship under Dr. Nate Kremer-Herman of the Computer Science Department and Dr. Robert Rutherford. Dr. Rutherford primarily constructed the base requirements and concept of the simulation. Additionally, the simulation is an extended implementation of a previous implementation authored by Dr. Rutherford, Jeremy Bjeljac, Sam Levy, Richard Charczenko, Madeline McMahon of the Seattle University Biology Department. Accompanying materials and design feeback in regards to the accuracy and learning potential of the simulation were provided by Sam Nouwens and Margaret Fitzgibbon.
Citations
Zimova, M., Mills, L.S. and Nowak, J.J. (2016), High fitness costs of climate change-induced camouflage mismatch. Ecol Lett, 19: 299-307. https://doi.org/10.1111/ele.12568