Run your Python code to see output here
msprime is a population genetics simulator based on tskit that can simulate random ancestral histories for a sample of individuals consistent with given demographic models. It simulates genealogical trees and genomic sequence data using various population genetic models and evolutionary processes. msprime can simulate mutations on ancestral histories (produced by msprime or other tskit-compatible programs) under a variety of genome sequence evolution models, making it an essential tool for population genetics research, evolutionary biology, and bioinformatics.
This compiler includes msprime 1.3+ with full support for coalescent simulation, powered by Pyodide WebAssembly technology. msprime supports simulating ancestral histories under different demographic models including constant population size, population growth, migration, and complex demographic scenarios. You can simulate genealogical trees with recombination, add mutations to tree sequences, analyze genetic diversity, and work with tree sequence data structures. Whether you're studying population genetics, evolutionary processes, genetic diversity, or demographic history, our msprime playground offers instant execution with comprehensive simulation capabilities. You can also upload and use files or folders directly in your code for population genetics analysis workflows. This compiler is online and completely free to use.
Our example collection covers essential msprime topics including basic coalescent simulation, simulating ancestral histories with recombination, adding mutations to tree sequences, working with demographic models, analyzing genetic diversity, and tree sequence manipulation. You'll learn how to simulate population genetic data, work with tree sequences, analyze genetic variation, and perform population genetics simulations for research and education.
Specialized Online Python compiler powered by Pyodide WebAssembly. Run Python Library directly in your browser with zero setup.