Skip to main content
Dryad logo

Code for: Environmental fluctuations dampen the effects of clonal reproduction on evolutionary rescue


Peniston, James; Barfield, Michael; Holt, Robert; Orive, Maria (2021), Code for: Environmental fluctuations dampen the effects of clonal reproduction on evolutionary rescue, Dryad, Dataset,


Evolutionary rescue occurs when genetic change allows a population to persist in response to an environmental change that would otherwise have led to extinction. Most studies of evolutionary rescue assume that species have either fully clonal or fully sexual reproduction; however, many species have partially clonal reproductive strategies in which they reproduce both clonally and sexually. Furthermore, the few evolutionary rescue studies that have evaluated partially clonal reproduction did not consider fluctuations in the environment, which are nearly ubiquitous in nature. Here, we use individual-based simulations to investigate how environmental fluctuations (either uncorrelated or positively autocorrelated) influence the effect of clonality on evolutionary rescue. We show that, for moderate magnitudes of environmental fluctuations, as was found in the absence of fluctuations, increasing the degree of clonality increases the probability of population persistence in response to an abrupt environmental change, but decreases the persistence in response to a continuous, directional environmental change. However, with large magnitudes of fluctuations, both the benefits of clonality following a step change and the detrimental effects of clonality following a continuous, directional change are generally reduced; in fact, in the latter scenario, increasing clonality can even become beneficial if environmental fluctuations are autocorrelated. We also show that increased generational overlap dampens the effects of environmental fluctuations. Overall, we demonstrate that understanding the evolutionary rescue of partially clonal organisms requires not only knowledge of the species life history and the type of environmental change, but also an understanding of the magnitude and autocorrelation of environmental fluctuations.


A full description of the methods can be found in the appendix of the associated manuscript.

Usage Notes

This .zip file contains the code and documentation for two individual-based models that simulate evolutionary rescue of partially clonal organisms in fluctuating environments. The first model simulates adaptation to an abrupt environmental change (abrupt_sim.cpp) and simulates adaptation to a directional environmental change (directional_sim.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: 1923495

National Science Foundation, Award: 1923513