Code for individual-based simulations in "Environmental fluctuations can promote evolutionary rescue in high-extinction-risk scenarios"
Peniston, James; Barfield, Michael; Gonzalez, Andrew; Holt, Robert (2020), Code for individual-based simulations in "Environmental fluctuations can promote evolutionary rescue in high-extinction-risk scenarios", Dryad, Dataset, https://doi.org/10.5061/dryad.4xgxd2568
Substantial environmental change can force a population onto a path towards extinction, but under some conditions, adaptation by natural selection can rescue the population and allow it to persist. This process, known as evolutionary rescue, is believed to be less likely to occur with greater magnitudes of random environmental fluctuations because environmental variation decreases expected population size, increases variance in population size, and increases evolutionary lag. However, previous studies of evolutionary rescue in fluctuating environments have only considered scenarios in which evolutionary rescue was likely to occur. We extend these studies to assess how baseline extinction risk (which we manipulated via changes in the initial population size, degree of environmental change, or mutation rate) influences the effects of environmental variation on evolutionary rescue following an abrupt environmental change. Using a combination of analytical models and stochastic simulations, we show that autocorrelated environmental variation hinders evolutionary rescue in low-extinction-risk scenarios but facilitates rescue in high-risk scenarios. In these high-risk cases, the chance of a run of good years counteracts the otherwise negative effects of environmental variation on evolutionary demography. These findings can inform the development of effective conservation practices that consider evolutionary responses to abrupt environmental changes.
A full descripition of the methods can be found in the appendix of the assossicated manuscript.
This .zip file contains the code and documentation for two individual-based models that simulate evolutionary rescue following an abrupt environmental change with different degrees of environmental variation. Both models assume that fitness is determined by a single quantitative trait. The first model incorporates environmental variation into the optimal phenotype (Var_theta.Cpp) and the second incorporates it into fecundity (Var_F.Cpp). Both models are written in C++. Documentation on how to run the code is given in the "README" file.
For detailed instructions for how to run simulations using this code, please see the README file. We have also provided example input files which will allow the user to replicate data in the manuscript. Information on how to use these files is also provided in the README file.
National Science Foundation, Award: DEB 1923495