Codes and scripts for Melo, D., & Marroig, G. (2014). Directional selection can drive the evolution of modularity in complex traits. Proceedings of the National Academy of Sciences of the United States of America, 2015 112 (2) 470-475; doi:10.1073/pnas.1322632112
http://www.pnas.org/content/early/2014/12/25/1322632112.abstract
- GSL http://www.gnu.org/software/gsl/
- IPython notebook http://ipython.org/notebook.html
- ggplot2 http://ggplot2.org/
py/pop.py is a Python 3 port of the C model. Its environment is managed with
pixi:
cd py
pixi install
pixi run sim -n 2500 -t 1000 -d 0.01 -r 42 # see `pixi run sim -h`
Output goes to py/dats/.
c-gsl/main.c reads input/omega.csv (fitness surface covariance),
input/theta.csv (initial optimum) and a parameter file in input/ with, in
order: population size, number of traits, number of loci, mutation rate of
allelic effects mu (per allele), mutation rate of the B matrix mu_b (per
entry), sigma, v_e, generations of drift, of stabilizing and of
directional selection, and the change in the optimum per generation (one value
per trait).
sigma (mutational effects on y) and v_e (environmental effects) are
standard deviations. A B matrix mutation flips the entry, so B entries change
at rate mu_b. Before November 2026 a mutation set the entry to a random
value, so entries changed at rate mu_b / 2; the published simulations used
that version.