DOI: 10.5061/dryad.0zpc86712
title: Revisiting the number of self‐incompatibility alleles in finite populations: From old models to new results

description: Under gametophytic self-incompatibility (GSI), plants are heterozygous at
 the self-incompatibility locus (S-locus) and can only be fertilized by
 pollen with a different allele at that locus. The last century has seen a
 heated debate about the correct way of modeling allele diversity in a GSI
 population that was never formally resolved. Starting from an
 individual-based model, we derive the deterministic dynamics as proposed
 by Fisher (1958), and compute the stationary S-allele frequency
 distribution. We find that the stationary distribution proposed by Wright
 (1964) is close to our theoretical prediction, in line with earlier
 numerical confirmation. Additionally, we approximate the invasion
 probability of a new S-allele, which scales inversely with the number of
 resident S-alleles. Lastly, we use the stationary allele frequency
 distribution to estimate the population size of a plant population from an
 empirically obtained allele frequency spectrum, which complements the
 existing estimator of the number of S-alleles. Our expression of the
 stationary distribution resolves the long-standing debate about the
 correct approximation of the number of S-alleles and paves the way for new
 statistical developments for the estimation of the plant population size
 based on S-allele frequencies.
description: Codes and datasets for generating the figures in the main text
 and the Supplementary Information of the manuscript entitled
 "Revisiting the number of self-incompatibility alleles: from old
 models to new results" published in the Journal of Evolutionary
 Biology (https://doi.org/10.1111/jeb.14061). Version Update June 2024: There was a small mistake in the code that has been corrected now. The published figures had to be corrected, which can be found here: doi:10.1093/jeb/voae059/7685015.
description: Generally, the code is structured per figure in the manuscript,
 i.e., all code to reproduce Figure X in the manuscript is contained in the
 folder labeled "FigureX". However, data and processing files
 need to be downloaded separately. Then the data needs to be copied into
 the respective folders of the software to run the codes. I am sorry for
 this complication, I do not like it either.
description: # Revisiting the number of self‐incompatibility alleles in finite
 populations: From old models to new results
 [https://doi.org/10.5061/dryad.0zpc86712](https://doi.org/10.5061/dryad.0zpc86712) Data files are simulations from C++ code, which are used to produce the figures in the manuscript [https://doi.org/10.1111/jeb.14061](https://doi.org/10.1111/jeb.14061)\ To reproduce the figures, a Python code is used. Unfortunately, the code to create the data files and to reproduce the figures had to be isolated from the data files (dryad asked me to do this...). The "software" files are found here: [https://zenodo.org/records/6983482]() ## Description of the data and file structure File List: Folder structure to reproduce the figures in the main text and supplementary material of the corresponding publication, published in the Journal of Evolutionary Biology (2022). Fig1 folder: stationary distribution of self-incompatibility alleles, theory vs. numerical simulation Fig2 folder: number of self-incompatibility alleles when varying the population size, theory vs. numerical simulation Fig3 folder: establishment probability of a new self-incompatibility allele, theory vs. numerical simulation Fig4 folder: parameter estimation of the population size based on a sample from simulated data, (a) estimation based on weighted least-squares, (b) estimation based on moment-estimator Fig5 folder: comparison of Wright's approximation of the stationary distribution of self-incompatibility alleles and our theoretical result Fig6 folder: diversification rate of self-incompatibility alleles over time, (a) low mutation rate, (b) high mutation rate SI folder: figures of the supplementary material * FigA: (a) genotype and (b) haplotype stationary distributions of gametophytic self-incompatibility * FigB: establishment probability of a new self-incompatibility allele for various theoretical approximations * FigC: least-squares function of the parameter estimation * FigD: comparison of unweighted and weighted least-squares estimation of the population size * FigE: same as Fig6 in the main text **(note that the supplementary files are not produced with the updated/correct code! -&gt; only the main text figures have been updated)** ## Sharing/Access information Links to the "software" to reproduce the data files and figures: * [https://zenodo.org/records/6983482]() ## Code/Software Simulations were implemented in C++. Data produced by these simulations was then processed in Python to produce the figures. Usage: please download the data (Dryad) and the code to process the data (Zenodo). Then move the data from Dryad into the respective folders of the processing code that you downloaded from Zenodo to generate the figures. I am sorry for this complicated procedure, Dryad requested me to do this.