Two locus likelihoods and ARGs under changing population size
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


version 1.0.0

LDpop is a program for computing 2-locus likelihoods under the coalescent with recombination. Unlike previous methods, LDpop can correctly account for variable (but piecewise-constant) population size history.

LDpop produces lookup tables that can be used by other programs to estimate recombination maps. Other programs that can use the output of LDpop include:

LDpop also provides utilities for efficient posterior sampling of 2-locus ARGs.

Installation and Dependencies


  • Python 2.7, 3.5, or 3.6
  • Optional: Java 8
    • Not required for computing lookup tables.
    • Required for posterior sampling of 2-locus ARGs.

To install, in the top-level directory of LDpop (where "" lives), type

pip install .

Getting started

Use run/ to create a lookup table. See

run/ --help

for usage.

By default run/ uses an exact algorithm to compute the likelihoods. To use a reasonable approximation that is much faster and scales to larger sample sizes, use the flag --approx.

run/ and run/ImportanceSampler.jar are for importance sampling from the posterior distribution of 2-locus ARGs. run/ creates a proposal distribution, that run/ImportanceSampler.jar uses to sample the ARGs. See their --help for instructions.

Also, see the examples.


Jack Kamm, Jeffrey Spence, Jeffrey Chan, Yun S. Song


Kamm, J.A.*, Spence, J.P.*, Chan, J., and Song, Y.S. Two-Locus Likelihoods under Variable Population Size and Fine-Scale Recombination Rate Estimation. Genetics, 2016.