Introduction

This is the manual for msprime, a population genetics simulator of ancestry and DNA sequence evolution based on tskit. msprime can simulate ancestral histories for a sample of individuals, consistent with a given demography under a range of different models and evolutionary processes. It can also simulate mutations on a given ancestral history (which can be produced by msprime ancestry simulations or other programs supporting tskit) under a variety of different models of genome sequence evolution.

Besides this manual, there are a number of other resources available for learning about tskit and msprime:

  • The tskit tutorials site contains in-depth tutorials on different aspects of msprime simulations as well as how to analyse simulated tskit tree sequences.

  • Our Discussions board is a great place to ask questions like “how do I do X” or “what’s the best way to do Y”. Please make questions as clear as possible, and be respectful, helpful, and kind.

  • The book chapter Coalescent simulation with msprime is a comprehensive introduction to running coalescent simulations with msprime, and provides many examples of how to run and use coalescent simulations. Note however that the chapter uses the deprecated legacy 0.x API, and so does not follow current best practices.

  • If you would like to understand more about the underlying algorithms for msprime, please see the 2016 PLoS Computational Biology paper. For more information on the Discrete Time Wright-Fisher model, please see the 2020 PLoS Genetics paper.

Important

If you use msprime in your work, please remember to cite it appropriately: see the citations page for details.