The evolution of condition-dependent self-fertilisation
Abstract
The evolution of condition-dependent self-fertilisation This repository contains the files associated with multilocus simulations and mathematical and numerical analyses associated with the article: The evolution of condition-dependent self-fertilisation Authors: Thomas Lesaffre, John R. Pannell and Charles Mullon Affiliation: Department of Ecology and Evolution, University of Lausanne, 1015 Lausanne, Switzerland Correspondence: thomas.lesaffre@unil.ch / thomaslesaffre.evolbiol@gmail.com Abstract: Self-fertilisation is common in cosexuals, but selfing rates vary among species, among populations and among individuals within populations. Most evolutionary theory seeking to explain this variation assumes genetically determined selfing rates. Here we study the evolution and consequences of condition-dependent selfing, where individuals adjust their selfing rate in response to their deleterious mutation load. We analyse a two-locus population-genetic model in which one locus determines condition and the other is a modifier locus that determines condition-dependent selfing rates, and then extend the analysis to a polygenic background in which condition is determined by many loci. Our results show that selection favours positive condition dependence: high-condition individuals self-fertilise whereas low-condition individuals outcross. The resulting reaction norm generates stable within-population variation in realised selfing rates at evolutionary equilibrium and reduces the mutation load. We further show that it persists under environmental heterogeneity, and that pollen discounting favours a gradual increase in selfing with condition, leading to a continuum of selfing phenotypes. Altogether, our results indicate that condition-dependent selfing can generate substantial within-population variation in selfing rates. It may therefore contribute to mating-system diversity, and in particular to the maintenance of mixed mating. Numerical and mathematical analyses The Two-locus_model.nb file is a Mathematica notebook that we used to check all the mathematical results we obtained and to run numerical analyses. It is structured to match the structure of the Appendix, with matching titles and comments along the code. The Fixed_Inbreeding_Depression.nb file is a Mathematica notebook that can be used to run numerical analyses in the presence of a fixed inbreeding depression component. Running both files requires a Mathematica license. All analyses were performed using version 14.2 of Mathematica. Multilocus simulations The Multilocus_simulations folder contains the source code for our individual-based simulation program, which is divided in several files: header.h: Header file that contains prototypes of functions and objects. main.cpp: Only serves to run the "recursion()" function. recursion.cpp: This file contains the most important function of the program, which executes the simulation procedure. functions.cpp: Contains the code of functions that are used in recursion() for recombination, determining the selfing rate of individuals based on their GRN and so on. par: The parameter file in which parameters must be supplied in the correct order for the simulation to run smoothly. To run the program, one needs to first compile it using a C++ compiler. We use: g++ -std=c++20 -o multilocus *.cpp from the folder containing the files on a Ubuntu 24.04 architecture. Once the program is compiled and the "par" file with at least one appropriately filed line of parameters (those preceded by a "*", see file), one can run a simulation with the command ./multilocus i where "i" is an integer that supplies the program with a number that identifies that simulation. In case several replica are run in parallel in the same folder, this allows each replica to have it's own uniquely identified output files. Simulation outputs The simulation outputs that were used to generate the figures presented in the article can be found in the SimulationData.zip archive. The archive contains four subfolders: BaselineModel contains all the output of simulations of our baseline model. Results for the full model are in Results_FullModel, results for simulations where a fixed selfing rate was enforced are found in Results_FixedSelfing, and results for simulations where a random value was fed to GRNs instead of individual condition can be found in Results_NoConditionDependence. EnvironmentalFluctuations contains the output of simulations where environmental effects on condition were varied. PollenDiscounting contains the output of simulations where we varied the shape and intensity of pollen discounting. DetailedGRNs contains simulation results where we recorded the full Gene Regulatory Networks expressed by individuals in order to produce Figs. 3C and 5A,B. Each simulation run generates several different output files. Simulations are identified by the list of parameter values used, which are all given in the name of corresponding output files along with a replicate number at the end. Files have prefixes that indicate their content: Summary files "res_pop-*" files contain summary statistic. Each line is a sampled generation (sampling occurs every "tmes" timesteps, which is a parameter) and columns give information in the following order: mean condition, variance in condition, inbreeding depression, mean selfing rate, variance in selfing rate, mean number of deleterious mutations per haploid genome, mean homozygosity at condition loci. "res_dist-*" files give the distribution of selfing rates in the population in bins of 0.01. Each line is a measured generation, and the columns give the number of individuals found in each bin. "res_w-*" filesgive the distribution of condition in the population in bins of 0.001. Each line is a measured generation, and the columns give the number of individuals found in each bin Raw output files "res_raw_a-*" files give the selfing rate of "nmes" individuals every "tmes" generation. Each line contains de values for the nmes individuals sampled in a given generation. "res_raw_w-*" files give the condition of "nmes" individuals every "tmes" generation. Each line contains de values for the nmes individuals sampled in a given generation. "res_raw_s-*" files give the number of generations of selfing since the last outcrossing event in the genealogy of "nmes" individuals every "tmes" generation. Each line contains de values for the nmes individuals sampled in a given generation. These data were generated but ended up not being used in any of the results presented in the article. "res_net-*" files give the network attributes of "nmes" individuals every "tmes" generations. On each line, new individuals are indicated by a "*" tag. The first "ngenes" values are the values of the "a" attribute of the gene regulatory network (gene biases), followed by "b" values (gene slopes), "u" values (input weights), "v" values (output weights) and "y" values (regulatory weights from the Y matrix, given line-wise). To help data manipulation, additional prefixes were added the name of files resulting from simulations with a fixed selfing rate ("fixed-") found in folder Results_FixedSelfing and from simulations were a random value was fed to networks instead of condition ("uncond-") found in folder Results_NoConditionDependence.
Fields of Study & Subjects
Evolution and Genetic Dynamics
Animal Behavior and Reproduction
Plant Reproductive Biology
Publication details
- Journal / source
- Zenodo (CERN European Organization for Nuclear Research)
- Publication date
- 8 February 2026