ZOMBI2
Simulating genome and phylogenetic evolution.
Evolve life end to end — species trees, then genomes, molecular sequences and traits along them. A ground-up redesign of ZOMBI, with a fast, composable Python library and a command-line interface.
pip install zombi2
What it simulates
Levels of evolution
Each level is a first-class model you can run on its own or stack on the one above — from the species tree down to the nucleotide.
01Species trees
Backward and forward birth–death and Yule, episodic shifts, fossilized BD with incomplete sampling, ClaDS, diversity-dependent rates, mass extinctions and ghost lineages.
Species-tree guide →02Genomes
Duplication, transfer, loss and origination along the tree — from gene copy-number profiles to nucleotide-resolution genomes, with ordered chromosomes, inversions and replacement transfers.
Genome guide →03Sequences
A gene × lineage relaxed clock that rescales gene trees from time into substitutions per site, with JC / K80 / HKY / GTR + Γ nucleotide models.
Sequence guide →04Traits
Brownian motion, Ornstein–Uhlenbeck and early burst for continuous traits; Mk and threshold for discrete; plus DEC biogeography, evolved along the phylogeny.
Trait guide →Command line
Running ZOMBI from the terminal
# 1 · species tree (backward birth–death) $ zombi2 species --birth 1 --death 0.3 \ --tips 50 --age 5 --seed 1 -o out/ # 2 · genomes along it (DTLO) $ zombi2 genomes --tree out/species_tree.nwk \ --dup 0.2 --trans 0.1 --loss 0.25 \ --orig 0.5 --seed 42 -o out/ # → gene trees · reconciliations · profiles
Python API
Running ZOMBI in Python
import zombi2 as z # 1 · species tree (backward birth–death) tree = z.simulate_species_tree( z.BirthDeath(birth=1.0, death=0.3), n_tips=20, age=5.0, seed=1) # 2 · genomes evolving along it genomes = z.simulate_genomes( tree, duplication=0.2, transfer=0.1, loss=0.25, origination=0.5, seed=42) # copy-number profiles, gene trees, reconciliations print(genomes.profiles.matrix) genomes.write("out/")
How to cite
Citing ZOMBI2
A dedicated ZOMBI2 paper is in preparation.
Until then, please also cite the original ZOMBI:
Davín AA, Tricou T, Tannier E, de Vienne DM, Szöllősi GJ. Zombi: a phylogenetic simulator of trees, genomes and sequences that accounts for dead lineages. Bioinformatics (2020) 36:1286–1288.