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
Forward birth–death and Yule, with fossils, incomplete sampling, mass extinctions and ghost lineages — plus rates that shift over time, drift as lineages split, or track standing diversity.
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 and LG / WAG / JTT / Dayhoff protein models.
Sequence guide →04Traits
Brownian motion, Ornstein–Uhlenbeck and early burst for continuous traits; Mk and threshold for discrete, evolved along the phylogeny.
Trait guide →Command line
Running ZOMBI from the terminal
# 1 · species tree (forward birth–death) $ zombi2 species out/ --birth 1 --death 0.3 \ --n-extant 50 --seed 1 # 2 · genomes along it (DTLO) — reads the tree from out/ $ zombi2 genomes out/ --duplication 0.2 --transfer 0.1 \ --loss 0.25 --origination 0.5 --seed 42
Python API
Running ZOMBI in Python
from zombi2 import species, genomes # 1 · species tree (forward birth–death) result = species.simulate_species_tree( birth=1.0, death=0.3, n_extant=20, seed=1) # 2 · genomes evolving along it g = genomes.simulate_genomes_family( result.complete_tree, duplication=0.2, transfer=0.1, loss=0.25, origination=0.5, seed=42) # gene copy-number profiles, gene trees, full history print(g.profiles.shape) g.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.