Published June 2, 2026 | Version v2
Software Open

The evolution of condition-dependent self-fertilisation

Authors/Creators

Description

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 (June 2026).

Authors: REDACTED FOR DOUBLE-BLIND PEER-REVIEW

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.

Multilocus simuations

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.

Files

Files (64.3 kB)

Name Size Download all
md5:3123d43b8d7856f62150820b02977cc8
64.3 kB Download

Additional details

Software

Programming language
C++ , Mathematica
Development Status
Active