Introduction#
phasegen is a population genetics coalescent simulator and parameter inference framework that leverages phase-type theory to provide exact solutions for various population genetic scenarios. phasegen supports multiple demes, varying population sizes and migration rates, multiple-merger coalescents, and recombination between two loci. To ensure correctness, phasegen has been extensively tested against msprime for a wide variety of demographic scenarios and statistics.
Motivation#
Coalescent simular such as msprime, while being very fast and flexible, provide stochastic solutions. This necessitates the use of Approximate Bayesian Computation (ABC) for parameter estimation, which can be computationally expensive. A set of tools that do, in principle, provide exact solutions are forward simulators, such as dadi and moments. However, forward simulators, while having the great advantage of being able to incorporate selection, have different caveats associated with model initialization, choice of run times, and they tend to be overall less efficient than backward simulations. phasegen is particularly useful in settings where exact solutions of the coalescent are required. The availability of exact solutions furthermore lends itself to gradient-based parameter estimation, such as maximum likelihood estimation (MLE), which can be more efficient than ABC in some cases.
Contents#
Python Reference
R Reference
API Reference
Miscellaneous