MCMCcoal: A Bayesian MCMC Coalescent Program
Version 1.2, March 2008

Ziheng Yang

Notes added by Ziheng on 20 May 2010:
The Bayesian program MCMCcoal (together with the simulation program MCcoal) is replaced by the new program BP&P (Yang and Rannala 2010). The likelihood program Ne3sML is replaced by the program 3s (Yang 2010). If you need to use the new methods described in those two 2010 papers, please use the newer programs instead.

MCMCcoal is an ANSI C program that implements the Bayesian Markov chain Monte Carlo (MCMC) algorithm of Rannala & Yang (2003) for estimating species divergence times and population sizes from DNA sequence alignments at multiple loci. Consult the paper for details of the model assumptions and the theory. The program can also be used to analyze a sample of sequences from one modern species under the standard neutral coalescent to estimate theta.

MCcoal. The same source code can also be compiled into a simulation program (MCcoal), for generating sequence alignments under a neutral-coalescent model.

Download MCMCcoal1.2a.tar.gz, which contains win32 executables as well as C source code for compiling on unix/linux/OSX. Make sure you save the file as MCMCcoal1.2a.tar.gz.

Version 1.2a (October 2010): The program occasionally hangs during the MCMC, when the proposal is reflected infinitely. This is now fixed. Anyway try to use bpp instead as I won't be updating this program.

Version 1.2 (March 2008). The following changes were introduced relative to version 1.1: addition of two models of mutation rate variation among loci: one using fixed locus rates estimated externally, and another of random variable rates across loci; two options for locus-specific heredity multipliers (inheritance scalars); a change of parametrization concerning species divergence times; and a model of random sequencing errors. See the documentation (MCMCcoalDOC.1.2.pdf) for details. Those changes were introduced in Burgess & Yang (2008).

Ne3sML. The win32 program Ne3sML program implements the ML method of Yang (2002). The program uses numerical integration routines in Mathematica so you have to have Mathematica 3.0 or later to run the program. Download the archive Ne3sML.win32.v1.1.tar.gz. Make sure you save the file as Ne3sML.win32.v1.1.tar.gz. The archive includes ANSI C source codes and the Mathematica package, as well as a readme file. To compile for MAC OSX or UNIX, you probably need to look at my notes for windows and also the documentation about mathlink AddOn supplied by Wolfram.


Burgess, R. and Z. Yang (2008). Estimation of hominoid ancestral population sizes under Bayesian coalescent models incorporating mutation rate variation and sequencing errors. Mol. Biol. Evol. 25: 1979-1994.

Rannala, B. and Z. Yang (2003). Bayes estimation of species divergence times and ancestral population sizes using DNA sequences from multiple loci. Genetics 164: 1645-1656.

Yang, Z. (2002). Likelihood and Bayes estimation of ancestral population sizes in Hominoids using data from multiple loci. Genetics 162: 1811-1823.

Yang, Z. (2010). A likelihood ratio test of speciation with gene flow using genomic sequence data. Genom. Biol. Evol. 2:200-211.

Yang, Z., and B. Rannala. (2010). Bayesian species delimitation using multilocus sequence data. Proc. Natl. Acad. Sci. U.S.A. 107:9264-9269.

Last modified: May 2010