G-PhoCS: A Generalized Phylogenetic Coalescent Sampler

News !!  (Sept 8, 2013)

  G-PhoCS subversion 1.2.3 is out.

  What's new ?
    - added option for fixing and estimating the age of ancient DNA samples.
      Associate the ancient sample with a current population, specify its age in the control file, and indicate whether you would like the age to stay fixed throughout the sampling algorithm or if you would like it to be sampled and thus estimated from the data and assumed model. See manual for details on how to set up the analysis.

  New in version 1.2.2 (July 26, 2013)
    - fixed several bugs leading to program crashes. Thanks to all users who sent bug reports!

  New in version 1.2.1 (Feb 2, 2012)
    - fixed bug occurring in large data sets (large number of populations/mig-bands/samples)
    - added section 5.1 to G-PhoCS user manual, describing how to apply G-PhoCS on large datasets
    - released binaries for MacOSX(Intel) and Windows(32bit)

  New in version 1.2 (Jan 1, 2012)
    - control file format modified and cleaned up
    - some optimizations introduced in likelihood computation leading to ~10% decrease in running time
    - fixed some bugs leading to software crashes
    - new and improved manual
  Stay tuned for updates, and upcoming features...

G-PhoCS is a software package for inferring ancestral population sizes, population divergence times, and migration rates from individual genome sequences. G-PhoCS accepts as input a set of multiple sequence alignments from separate neutrally evolving loci along the genome. Parameter inference is done in a Bayesian manner, using a Markov Chain Monte Carlo (MCMC) to jointly sample model parameters and genealogies at the input loci.

G-PhoCS is inspired by and derived from MCMCcoal, developed by Ziheng Yang. Two main conceptual differences separate G-PhoCS from MCMCcoal:
  1. G-PhoCS models gene flow between populations along user-defined migration bands.
  2. G-PhoCS analyzes unphased diploid genotypes using a novel method for integrating over all possible phases.

Additional adjustments were made to the C implementation of MCMCcoal in order to make it more efficient and reduce running time.

More information on G-PhoCS can be found in Section 4 of the supplement to our paper, and in the G-PhoCS user manual.

G-PhoCS is still at an experimental stage. We are working on cleaning up the code and improving the user interface. We encourage people to try G-PhoCS out on their favorite data sets, and appreciate any feedback we get. We will post updates and fixes periodically on this website.

Thanks for your understanding.

Downloads (Last updated on Sep 10, 2015)

Source code tar GPhoCS-1.2.3.tar.gz
MacOSX(Intel) binaries G-PhoCS-1.2.1-MacOSX.zip (Note: binary avaiable only for version 1.2.1)
Windows(32bit) binariesG-PhoCS-1.2.2-Win32.zip (Note: binary avaiable only for version 1.2.2)


G-PhoCS is implemented in C, developed and tested on Linux. For Linux users, we provide source code and build instructions, and for Windows and Mac users, we do provide ready-made binaries.


  1. Download the G-PhoCS source code

  2. Unzip the downloaded file
    tar -xvzf GPhoCS-.tar.gz
  3. Move to the unzipped directory
    cd G-PhoCS
  4. Compile G-PhoCS
  5. Done! Try G-PhoCS on our sample control file.
    bin/G-PhoCS-1-2-2 sample-control-file.ctl

Windows / MacOSX(Intel)

Download the appropriate zip archive, and unzip to produce manual, sample files, and bin/ directory with executables

Useful Links

  BSNP A Bayesian SNP caller from short read data with reduced reference bias.
  Data Sequence data from seven individual human genomes used in the demographic analysis of Gronau et al. Nat Genet 2011.


Gronau I, Hubisz MJ, Gulko B, Danko CG, Siepel A.   Bayesian inference of ancient human demography from individual genome sequences.  Nature Genetics 43 1031–1034.   2011


Problems, questions, feature requests should be directed to