Code from: The effect of long-range linkage disequilibrium on allele-frequency dynamics under stabilizing selection
Data files
Feb 20, 2026 version files 11.93 KB
-
code_consolidated.slim
10.54 KB
-
README.md
1.39 KB
Abstract
Stabilizing selection on a polygenic trait reduces the trait's genetic variance by (i) generating correlations (linkage disequilibria) between opposite-effect alleles throughout the genome, and (ii) selecting against rare alleles at loci that affect the trait, eroding heterozygosity at these loci. Here, we show that the linkage disequilibria, which stabilizing selection generates on a rapid timescale, slow down the subsequent allele-frequency dynamics at individual loci, which proceed on a much longer timescale. Exploiting this separation of timescales, we obtain expressions for the expected per-generation change in minor-allele frequency at individual loci, as functions of the effect sizes at these loci, the strength of selection on the trait, its variance and heritability, and the linkage relations among loci. Using whole-genome simulations, we show that our expressions predict allele-frequency dynamics under stabilizing selection more accurately than the formulae that have previously been used for this purpose. Our results have implications for understanding the genetic architecture of complex traits.
File: code_consolidated.slim
SLiM script used to generate figures in Negm & Veller, "The effect of long-range linkage disequilibrium on allele-frequency dynamics under stabilizing selection."
There are several options:
"map": The loci underlying variation in the trait can be unlinked (option "unlinked"), or they can lie along the linkage map of humans (option "human") or Drosophila melanogaster (option "Dmel").
"MAFs_setting": The minor allele frequencies can be constant, at 0.2, across loci (option "constant") or they can vary across loci, chosen independently from a uniform distribution on [0.1, 0.3] (option "variable").
"effectSizes_setting": The effect sizes of alleles can be constant, at 1, across loci (option "constant"), or they can vary across loci, chosen independently from a normal distribution with mean zero and variance 1 (option "variable").
For Figure 1 in Negm & Veller, map=unlinked, MAFs_setting=constant, effectSizes_setting=constant.
For Figure 2A, map=human, MAFs_setting=constant, effectSizes_setting=constant.
For Figures 2B and 3, map=Dmel, MAFs_setting=constant, effectSizes_setting=constant.
For Figure S2, map=unlinked, MAFs_setting=variable, effectSizes_setting=variable.
For Figure S3, map=Dmel, MAFs_setting=variable, effectSizes_setting=variable.
For Figures S1 and S4, map=human, MAFs_setting=variable, effectSizes_setting=variable.
