bppseqgen is the sequence simulator of the Bio++ Program Suite. It evolves sequences down a tree under a substitution model you describe in text, and writes the tip alignment. Models, rate distributions and processes are declared as numbered options and then linked together.
In this recipe the declaration is: a Newick tree, an HKY85 model (kappa for the transition/transversion rate, theta for GC content), a 4-category discretised gamma distribution of rates across sites, and a homogeneous process that applies one model to the whole tree. Branch lengths come from the tree file; the log prints Branch lengths: Input.
Key assumptions:
Sites are independent draws from the rate distribution.
Every branch uses the same model (homogeneous process).
Substitutions only. The example alignment has no gap characters.
When to use it
Use bppseqgen when you want the model written out explicitly and reusable, or when you want to extend the same description to several models and processes later. The recipe here uses one model on one tree.
Alternatives on biosimhub:
Seq-Gen is faster to learn for plain HKY, F84, GTR and protein matrices. It is a short command line.
Pyvolve fits when you want codon models with dN/dS or want to build the model in Python.
A dry run of the command resolved bppsuite 3.0.0 with about 148 MB of dependencies. Bio++ also ships Linux binaries on https://github.com/BioPP/bppsuite/releases, a Homebrew tap for macOS and an Apptainer image; the project's installation page lists them.
The tool's own command line takes key=value options. Minimal run on a tree file:
In the recipe's image, this JC69 form with seed 42 wrote 6 sequences of 500 sites, 69 of them variable. Add rate_distribution1=Gamma(n=4,alpha=0.5) and rate=1 in the process line, as the recipe below does, for rate variation.
Run the tested example
This recipe builds Bio++ bppseqgen in a container and runs the example below. It needs Docker and nothing else. It last ran on 2026-10-12 in 0.2 s.
******************************************************************
* Bio++ Sequence Generator, version 3.0.0 *
* *
* Authors: J. Dutheil *
* B. Boussau Last Modif. January 28th, 2026 *
* L. Gueguen *
* M. Groussin *
******************************************************************
Parsing options:
Random seed set to.....................: 42
Alphabet type .........................: DNA
Ranges are the limits used for the example recipe; the program itself may accept more.
Reading the output
The example tree has 6 primates (human, chimp, gorilla, orangutan, macaque, baboon). The run writes alignment.txt (3087 bytes) and bppseqgen_log.txt (2149 bytes, which is the program's standard output).
The log is the record of what was simulated. It reports Number of leaves: 6, then the four gamma categories for alpha 0.5, each with probability 0.25:
Category
Rate
0
0.0334
1
0.2519
2
0.8203
3
2.8944
The mean rate is 1. The slowest class changes sites 87 times slower than the fastest. The log then confirms HKY85.kappa=2 and theta=0.5, and ends with Number of sites: 500. It also warns Parameter root.data not specified. Default used instead, so the root sequence is the default one and no alignment supplies it.
The alignment is FASTA with 100 characters per line, 5 lines per sequence. Human to macaque is a path of 0.0678 substitutions per site, so about 34 differences are expected in 500 sites. The run shows 35 (14 transitions, 21 transversions). Across all six taxa, 57 of 500 columns vary.
Your own runs
Changes below keep the example tree and seed 42 unless stated. Counts are for this one seed, so they show a direction and carry no average over seeds.
Rate variation, alpha 0.05 and 100. Variable columns went from 57 (alpha 0.5) to 44 at alpha 0.05 and to 68 at alpha 100. Strong variation puts the changes in few sites. Human to macaque differences were 26 at 0.05 and 37 at 100.
Transition bias, kappa 20. Human to macaque split into 29 transitions and 4 transversions, against 14 and 21 at kappa 2.
GC content, theta 0.9. Mean GC across the six sequences was 0.914, against 0.515 with theta 0.5.
Output format, Phylip. The header line reads 6 500, followed by each name and its sequence, 100 characters per line, with continuation lines indented.
Reproducibility. Seed 42 twice gave identical files. A different seed (7) gave 66 variable columns and 29 human-macaque differences.
Pitfalls
Sequence file goes where output.sequence.file says. Standard output carries only the log. Redirect it if you want to keep it.
A wrong tree path fails with a short error. With a misplaced argument the log said File does not exists: /work/in/500 and no alignment was written. Read the first lines of the log when no alignment appears.
Branch lengths are used as given. The example tree is shallow (maximum root-to-tip about 0.05), so only 57 of 500 sites vary. Rescale your tree if you want more divergence.
Set --seed. Reruns with the same seed gave identical files in the check above.
Option numbers must match.process1 points at model=1 and tree=1. If you add a second model, give it model2 and link it in its own process.
The recipe fixes theta1 and theta2 at 0.5 and gamma at 4 categories. Edit the command if you need other values.