We include four example scripts here that correspond to the major analyses performed in the paper.

Note that in order to actually run these, you will need to obtain both sfs_code and sfs_coder 
(relevant web addresses at the bottom of this file).  You will also need to set the path to sfs_code
to the appropriate location on your machine in the simulation scripts.

1) calc_sfs.py calculates the time-dependent site frequency spectrum in the Gravel model of
European demographic history (Figure 1A).

2) gravel_marg.py simulates the same model stochastically using SFS_CODE.

3) pathway.gravel.py simulates the three-population model of Europeans, Asians, and Africans 
used throughout the rest of the paper. By replacing model='gravel' with model='tennessen' in this code, 
you can also simulate the explosive growth model that we considered.

4) generate_phenotype.py simulates phenotypes under our generalized version of the phenotype model of
Simons et al (Nature Genetics, 2014), using the simulated genotypes from pathway.gravel.py as input.

Each script contains some information about the steps/commands invoked.

More code and examples can be found in the sfs_coder distribution, available freely at:

http://sfscode.sourceforge.net/SFS_CODE/index/index.html

More documentation for sfs_coder is available at:

http://uricchio.github.io/sfs_coder/
