Data from: Parallel genetic evolution and speciation from standing variation
Data files
Nov 06, 2024 version files 31.50 MB
-
Analysis_and_figures_Rproject.zip
30.75 MB
-
MainTextSims.py
30.73 KB
-
notebooks.zip
722.65 KB
-
README.md
2.22 KB
Abstract
Adaptation often proceeds from standing variation, and natural selection acting on pairs of populations is a quantitative continuum ranging from parallel to divergent. Yet, it is unclear how the extent of parallel genetic evolution during adaptation from standing variation is affected by the difference in the direction of selection between populations. Nor is it clear whether the availability of standing variation for adaptation affects progress toward speciation in a manner that depends on the difference in the direction of selection. We conducted a theoretical study investigating these questions and have two primary findings. First, the extent of parallel genetic evolution between two populations rapidly declines as selection changes from fully parallel toward divergent, and this decline is steeper in organisms with more traits (i.e., greater dimensionality). This rapid decline happens because small differences in the direction of selection greatly reduce the fraction of alleles that are beneficial in both populations. For example, populations adapting to optima separated by an angle of 33° might have only 50% of potentially beneficial alleles in common. Second, relative to when adaptation is from only new mutation, adaptation from standing variation improves hybrid fitness under parallel selection and reduces hybrid fitness under divergent selection. Under parallel selection, genetic parallelism from standing variation reduces the phenotypic segregation variance in hybrids, thereby increasing mean fitness in the parental environment. Under divergent selection, larger pleiotropic effects of alleles fixed from standing variation lead to maladaptive transgressive phenotypes when combined in hybrids. Adaptation from standing genetic variation therefore slows progress toward speciation under parallel selection and facilitates progress toward speciation under divergent selection.
Simulation script, Mathematica notebooks, simulated data, and R scripts for plotting and analyzing the data.
Description of the data and file structure
Main Text Simulation Script
The ‘MainTextSims.py’ file is the file that can be run to reproduce the main analysis. After installing Python, run:
python MainTextSims.py
Output files will go into a folder called ‘data’ in the present directory. To change, edit ‘data_dir’ parameter in the script.
Notebooks Folder
The ‘Notebooks’ folder (zipped) contains five Wolfram Mathematica notebooks that produce results in the paper. You must have Mathematica installed to view them. The Wolfram Player program can do this for free.
- som.nb—Supporting Mathematica notebook for “Patterns of speciation and parallel genetic evolution under adaptation from standing variation”. This is the key document. The remainder documents are supplementary and their contents are:
- fitnessvarload.nb—investigates the effect of variance “load” on hybrid fitness
- HoC.nb—analyzes the House of Cards model
- overlap.nb—computes the fraction of overlap between circles and (hyper)spheres
- parallelism_testing.nb—is a referenced workbook that computes parallelism
Analysis and figures Rproject
The ‘Analysis_and_figures_Rproject’ folder (zipped) contains an RProject file for RStudio, and data and scripts subfolders.
The files in ‘data’ are all output by a run of the main text simulation script, and their filenames reveal the Figure to which they are plotted, and the parameters used in the run. These files are retrieved by the Rscripts in Scripts.
- n is dimensionality
- N is population size
- alpha is mutational SD
- u is mutation rate
- sigma is strength of selection
The file in ‘scripts’ (a single script) is an R script that reads in the data in the data folder. The script is annotated and describes which figures are being generated where.
Code/Software
All code and software versions are listed in the main text of the open-access paper.