DOI: 10.5061/dryad.8sf7m0ct8
title: Data for: Outcomes of multifarious selection on the evolution of visual signals

description: Multifarious sources of selection shape visual signals and can produce
 phenotypic divergence. Theory predicts variance in warning signals should
 be minimal due to purifying selection, yet polymorphism is abundant. While
 in some instances divergent signals can evolve into discrete morphs,
 continuously variable phenotypes are also encountered in natural
 populations. Notwithstanding, we currently have an incomplete
 understanding of how combinations of selection shape fitness landscapes,
 particularly those which produce polymorphism. We modeled how combinations
 of natural and sexual selection act on aposematic traits within a single
 population to gain insights into what combinations of selection favor the
 evolution and maintenance of phenotypic variation. With a rich foundation
 of studies on selection and phenotypic divergence, we reference the poison
 frog genus Oophaga to model signal evolution. Multifarious selection on
 aposematic traits created the topology of our model’s fitness landscape by
 approximating different scenarios found in natural populations. Combined,
 the model produced all types of phenotypic variation found in frog
 populations, namely monomorphism, continuous variation, and discrete
 polymorphism. Our results afford advances into how multifarious selection
 shapes phenotypic divergence, which, along with additional modelling
 enhancements, will allow us to further our understanding of visual signal
 evolution.
description: All the data are computational and generated with the code
 provided.
description: The programs required to open the data files, generate the
 scenarios and reproduce the computations are Python 3.0 (open-source;
 https://www.python.org/downloads/) and Matlab (proprietary; MATLAB and
 Statistics Toolbox Release 2019b, 9.7.0.1190202 (R2019b). Natick,
 Massachusetts, The MathWorks Inc.). The Matlab files can be opened
 directly using Python as shown the Python code
 (Pop_Evo_multifarious_evolution_free_energy_Fokker_Planck_equation.py). An
 open-source alternative to run the Matlab routines and generate/modify the
 scenarios (cf. README.md) is Octave (https://octave.org/).
description: # Data for: Outcomes of multifarious selection on the evolution of visual
 signals Yeager, Justin and Penacchio, Olivier, Proceedings of the Royal
 Society B, March 2023 This repository contains all the experimental data
 to reproduce the simulations, results and analysis of the paper
 "Outcomes of multifarious selection on the evolution of visual
 signals",
 [https://royalsocietypublishing.org/doi/abs/10.1098/rspb.2023.0327](https://royalsocietypublishing.org/doi/abs/10.1098/rspb.2023.0327). ## Description of the Data and file structure ### Summary: * File count: 9 * Total file size: 4.08 MB * Range of individual file sizes: 35 kB - 801 kB * File formats: .mat ### File naming: * The Matlab files (*.mat) that give the fitness landscape (total\_free\_energy\_landscape\_for\_Fokker\_Plank\_equation\_*) are named after the different scenarios contemplated in the manuscript, namely scenarios A, B1, B2, and C, and include information on the size of the phenotypic space (Siz50); each files provides a fitness landscape represented by a 50 x 50 matrix of real values. *The Matlab files (*.mat) that gives the output of the model across time (cInput\_across\_time\_ie\_population\_distribution\_evolution\_\*) are also named after the different scenarios, with added information regarding the starting location of the population for scenario C ((12,20) vs (15,15)); each file provides the evolution of the population in the corresponding scenario and is given by a 41 x 50 x 50 matrix, where the first entry corresponds to 41 time steps between date 0 (start) and 1000 (no more evolution). ### Table of content: * total\_free\_energy\_landscape\_for\_Fokker\_Plank\_equation\_scenarioA\_Siz50.mat * total\_free\_energy\_landscape\_for\_Fokker\_Plank\_equation\_scenarioB1\_Siz50.mat * total\_free\_energy\_landscape\_for\_Fokker\_Plank\_equation\_scenarioB2\_Siz50.mat * total\_free\_energy\_landscape\_for\_Fokker\_Plank\_equation\_scenarioC\_Siz50.mat * cInput\_across\_time\_ie\_population\_distribution\_evolution\_scenarioA.mat * cInput\_across\_time\_ie\_population\_distribution\_evolution\_scenarioB1.mat * cInput\_across\_time\_ie\_population\_distribution\_evolution\_scenarioB2.mat * cInput\_across\_time\_ie\_population\_distribution\_evolution\_scenarioC\_12\_20.mat * cInput\_across\_time\_ie\_population\_distribution\_evolution\_scenarioC\_15\_15.mat ### Related files: #### Code/scripts * The Matlab and Python code to define the fitness landscape and run the simulations can be found on Zenodo Overall, the code tracks the evolution of the distribution of phenotypes in a population with a constant number of individuals in different scenarios. Depending on the different forces at play operate synergistically or in opposition, the distribution of phenotypes evolves towards all types of phenotypic variation, including monomorphism, continuous variation, and discrete polymorphism. The Matlab function `create_landscape_for_scenarios_ABC.m` generates the three components that make the fitness landscape, namely W\_cost, W\_nat and W\_sex, and exports them to build the total fitness landscape W\_total = W\_cost + W\_nat + W\_sex. The Python function `Pop_Evo_multifarious_evolution_free_energy_Fokker_Planck_equation.py` models the temporal evolution of the distribution of phenotypes given a random component (the diffusion term, D) and the fitness landscape F\_total. This is done using a Fokker-Planck equation in its equivalent formulation using free energy equivalent (see text for details). The code finds the distribution of phenotypes that minimizes free energy, which corresponds to the distribution that maximizes the fitness on the fitness landscape F\_total given the processes of diffusion driven by D. #### Figures * The figures and animations of the evolutionary trajectories of the distributions of phenotypes can be found on Zenodo The evolutionary trajectories of the distribution of phenotypes for all scenarios are provided by videos `movie_scenarioA_compressed.mp4`, `movie_scenarioB1_compressed.mp4`, `movie_scenarioC_case1_compressed.mp4`, and `movie_scenarioC_case2_compressed.mp4`. **End of README file**