ZOMBI2 · examples

Examples gallery

Species trees

6Forward birth–death trees — the whole history, survivors and extinctions, with the diversification model made visible.
Yule tree

Yule tree

Pure birth, no extinction — a forward tree of 100 lineages.

pure birth (Yule)
Extinct lineages

Extinct lineages

The full history behind 50 survivors — their branches solid, extinct lineages dashed.

birth–death
Mass extinction

Mass extinction

A pulse at t = 3 culls 75% of lineages — the skyline drops sharply at the dashed line, then recovers.

mass extinction · + skyline
Rate shifts

Rate shifts

Speciation runs slow, then fast, then slow — the burst packs branches between the two dashed regime lines.

time-varying birth
Diversity-dependent

Diversity-dependent

Speciation slows as diversity fills up; the skyline rises and plateaus at the cap of 100.

birth–death · + skyline
Shape statistics over many trees

Shape statistics over many trees

Two thousand trees of 100 tips under each of two processes — diversity-dependence bends the lineage curves over (left), and the γ statistic separates the two sets of trees almost perfectly (right).

simulation study · 4000 trees

Genomes

7Genes on chromosomes — a genome as a ring, synteny between genomes, and gene-family events and copy number read against the species tree.
Circular genome (ordered)

Circular genome (ordered)

A genome as a ring — genes evenly spaced by rank, coloured by family, arrows by strand. plot(g, layout="circular") + genes().

phylustrator · circular
Synteny between two genomes

Synteny between two genomes

Two genomes, one per row; ribbons link same-family genes and cross where the order was rearranged. stack([a,b]) + synteny().

phylustrator · synteny
Gene-family events on the tree

Gene-family events on the tree

One family's history on the species tree: duplications (squares), losses (crosses) and transfers (arrows, donor→recipient). plot(tree) + branch_events(…).

phylustrator · events
Profile copy-number

Profile copy-number

A family × genome copy-number heatmap, its rows locked to the tips. beside(tree, heatmap(profiles)).

phylustrator
Real genome (Mycoplasma)

Real genome (Mycoplasma)

A real bacterium — Mycoplasma genitalium, 546 genes at their true base positions, coloured by strand; the forward/reverse switch marks the replication origin. read_gff(…).

phylustrator · real GFF
An inversion, before → after

An inversion, before → after

One inversion on a circular genome: the affected segment is reversed and its strands flip (the arrows turn round). The band marks the segment in both rings. highlight(g, start, end) + genes().

phylustrator · circular
A transfer highway between clades

A transfer highway between clades

Transfers steered to run between two clades (a Clades + Between kernel — topology, not a trait). Tree coloured by clade; the barplot counts transfers by clade pair, so A↔B towers over within-clade.

clades · transfer_to

Sequences

4The dated tree the sequences evolve down, and an alignment lined up row-for-row with its tips.
Sequence phylogram

Sequence phylogram

The clock tree the sequences evolve down — branch lengths are substitutions/site under an uncorrelated relaxed clock, so the tips are not level.

phylustrator · phylogram
Autocorrelated-clock phylogram

Autocorrelated-clock phylogram

The other clock we ship: under the autocorrelated clock the rate drifts parent→child, so related lineages share a rate — branches coloured by lineage rate move in blocks, not salt-and-pepper. substitution = FromParent(spread).

phylustrator · phylogram
Ancestral sequences at the nodes

Ancestral sequences at the nodes

A small tree with its internal nodes numbered (0 = initial genome, 1 = crown, …); beside it the reconstructed sequence at each — one free-floating row per node, not aligned to the tips. seqs.ancestral.

phylustrator · ancestral
Alignment beside the tree

Alignment beside the tree

A single-copy family across 20 species, residues coloured (with a nucleotide key), each row locked to its tip. beside(tree, alignment(aln)).

phylustrator

Trait evolution

5A trait evolving down the tree — branches coloured by its value; some paired with a companion panel.
Brownian motion

Brownian motion

Free diffusion — sister lineages drift apart with time.

continuous
Ornstein–Uhlenbeck

Ornstein–Uhlenbeck

Pulled to an optimum: a high start (yellow) converges to blue.

continuous
Discrete states

Discrete states

A two-state trait hops between habitats; each branch is painted by its state history.

discrete · Mk
Dependent continuous traits

Dependent continuous traits

Two traits evolve together (r = 0.9) — two trees, coloured by each trait, and the tip scatter.

continuous · + scatter
Dependent discrete traits

Dependent discrete traits

Two binary characters where one's flip rate depends on the other's state. Two trees, coloured by each character (X green, Y purple), so you can see Y is present where X is; the 2×2 chain (arrow width = rate) is the model. simulate_discrete(states=("00",…), switch={…}).

discrete · dependent

Conditioning

4Two runs, in order: a trait is grown on the tree and held fixed, then a genome run reads it. The trait's state sets a genome rate, so genome size follows the trait.
Genome reduction

Genome reduction

A driver (a trait for the lifestyle) modifies the rate of loss (the target). Endosymbionts also gain genes more slowly, so their genomes shrink. The tree is coloured by the lifestyle and the bars are genome size at each tip.

trait → loss
Genome expansion

Genome expansion

A driver (a trait for the strength of selection) modifies the rate of duplication (the target). Under relaxed selection duplicates accumulate and the genomes grow. The tree is coloured by the selection regime and the bars are genome size at each tip.

trait → duplication
HGT uptake by competence

HGT uptake by competence

A driver (a trait for competence) modifies who receives a transfer (the target), not a rate. Competent lineages take up DNA more often and their genomes grow. The tree is coloured by competence and the bars are genome size at each tip.

trait → transfer uptake
A continuous driver

A continuous driver

A driver (a diffusing continuous trait) modifies the rate of origination (the target). A Curve turns each value into a factor, so genome size follows the trait. The tree is coloured by the trait value and the bars are genome size at each tip.

continuous trait → origination

Joining

3One run makes both. The trait sets the speciation or extinction rate of the lineage carrying it, so the trait and the tree are produced together.
BiSSE

BiSSE

A two-state trait drives speciation — the fast state's clades take over; the inset is the state Markov chain.

trait → speciation
State-dependent extinction

State-dependent extinction

One state dies far faster; the doomed lineages (dashed) drop out.

trait → extinction
MuSSE

MuSSE

Three graded speciation rates with constant death — the fastest state fills the tree, extinct lineages dashed.

trait → speciation