R code for simulations of "Detection of cryptic sex in automictic populations: theoretical expectations and a case study in Cataglyphis desert ants".
Allelic data for microsatellite marker CcXX or ChXX of Cataglyphis mauritanica queens from the study of Kuhn et al. (Kuhn, A., Bauman, D., Darras, H., & Aron, S. (2017). Sex-biased dispersal creates spatial genetic structure in a parthenogenetic ant with a dependent-lineage reproductive system. Heredity, 119(4), 207-213.)
R1
and R2
corresponds to the lineage of the queens. all1
and all2
corresponds to the allele (first or second; queens are diploids in ants).
Allelic frequencies of the putative migrant males from the study of Kuhn et al. 2017.
R script to compute observed and expected heterozygosity and individual inbreeding coefficient on the C. mauritanica simulated data.
Generate p-values by comparing empirical to simulated data over loci and over runs for the C. mauritanica based dataset.
R script to simulate new generation of C. mauritanica queens according to their reproductive mode (rate of automixis and rate of sexual reproduction) and based on empirical data from Kuhn et al. 2017.
R script to compute the chisquare-like statistics based on rij to compare empirical and simulated datasets.
Loiselle's kinships (Fis) and expected heterozygosity (Hs) from empirical queen genotypes computed with SPAGeDi.
R script to compute observed and expected heterozygosity and individual inbreeding coefficient on the C. mauritanica empirical data.
R script with the functions used for simulating generations (in the general model or for the simulated C. mauritanica dataset).
R script to introduce simulation parameters and to run generations simulation (through the script simulated_generations.R
) for the general model.
R script to introduce simulation parameters and to run generations simulation (through the script Simulation_generations_mauritanica.R
) for the C. mauritanica simulated dataset.
R script to run generations simulation for the general model.