Simulating Finite Sites under COmplex Demographic Events


SFS_CODE can perform forward population genetic simulations under a general Wright-Fisher model with arbitrary migration, demographic, selective, and mutational effects.

This program was developed by Ryan Hernandez (ryan.hernandez [at] ucsf [dot] edu). The project began while he was a graduate student in the Bustamante lab at Cornell University, and maintenance continued through his posdoc with Molly Przeworski at the University of Chicago.  Ryan is currently an assistant professor at UCSF.


  1. BulletMany thanks to Lawrence Uricchio (a graduate student in the lab) who created sfs_coder, a nice python-based front-end for SFS_CODE!  This allows the user to perform simulations based on any desired region of the human genome, including the inferred local recombination map, as well as a distribution of deleterious selection coefficients on coding and conserved-noncoding loci.

  2. BulletMany thanks to my β-users, especially Ryan Gutenkunst, who helped me to debug and stress-test this program, and to the National Science Foundation for support through a Minority Postdoctoral Research Fellowship while at the University of Chicago.  SFS_CODE is now supported by the NIH, grant number 1R01HG007644.


  1. BulletSFS_CODE_doc.pdf (Also included with source code download)


  1. BulletDownload SFS_CODE from the project page.

  2. BulletDownload sfs_coder and associated genome files from the project page (front-end to SFS_CODE).


  1. BulletSourceforge project page

  1. BulletJoin the SFS_CODE mailing lists to stay informed about updates and to participate in general discussion about the program.

  1. BulletReport a bug or learn about existing problems using the bug tracker.

  2. BulletIs SFS_CODE missing a feature that you would like to simulate? Request it!

  1. BulletSee Comparisons & Expectations and Performance pages for more information.

  1. BulletBack button not working?  Try selecting the desired page from your browser’s history using the pulldown menu next to the back button (often in the shape of a downward pointing triangle).

  2. BulletSFS_CODE in use!  See a (hopefully growing) list of articles that cite SFS_CODE.

  3. BulletReference: Hernandez, RD. (2008) A flexible forward simulator for populations subject to selection and demography.  Bioinformatics, 24:2786-2787. (text)

News (may not be visible on Chrome or Internet Explorer)

Blog Summary Widget