October 2026
trees-bootstrap - Compare estimated relationship support and sampling uncertainty across runs.
trees-bootstrap [OPTIONS] RUN [RUN ...]
trees-bootstrap [OPTIONS] RUN [RUN ...] :: RUN [RUN ...] [:: RUN ...]
Compare how often evolutionary relationships occur in samples of trees. Each relationship, or predicate, is either present or absent in each sampled tree. Its frequency estimates support; for a Bayesian posterior sample, this estimates posterior probability (PP).
Successive trees from an MCMC run are usually correlated. Ten consecutive trees with the same relationship can contain less information than ten independent observations. trees-bootstrap reports support, changes in the event history, and estimates of autocorrelation and effective sample size where available. With --bootstrap, it also estimates uncertainty in support by resampling contiguous blocks of that history.
This block bootstrap measures uncertainty from finite tree sampling. It does not resample alignment columns or calculate the conventional phylogenetic bootstrap support obtained by repeatedly estimating trees from resampled alignments.
Comparing independent runs helps reveal relationships whose estimated support has not settled. Similar estimates and narrow intervals are useful evidence of stable sampling, but runs can agree while all miss an important region of tree space.
Each input file is one run, in Newick or NEXUS format. Newick samples contain one tree per line; - reads standard input. Trees are interpreted as unrooted, and an artificial degree-two root is suppressed. All runs must have the same taxon set, but their leaf orders may differ.
Adjacent files form one group. Separate groups with :::
trees-bootstrap run1.trees run2.trees :: run3.trees run4.treesHere runs 1 and 2 are summarized individually and pooled as group 1; runs 3 and 4 form group 2. A group with only one run has just that run's summary. Pooling gives equal weight to retained trees, so longer runs contribute more observations. Use one group for replicate runs of the same analysis. Separate groups allow comparisons between analyses or conditions.
Selection proceeds independently per run: --until, then --skip, then --subsample, then --max. The default skip is 10%. A percentage uses the shortest run across all groups, after --until, to calculate one count rounded down. That same count is discarded from every run. Thus runs of 100 and 200 trees with --skip 10% both lose 10 trees, before any thinning.
Subsampling retains the first survivor and every Nth tree thereafter. A maximum thins each run to evenly spaced positions, including its first and last retained trees; a maximum of one keeps the first. It does not cap the pooled group size.
Without --predicates, examine splits whose observed support exceeds --min-support in at least one run. A split divides all leaves into two groups, as an internal branch does. Automatically selected splits are ordered by pooled occurrence count.
A predicate file selects particular questions. For example:
A B | C D
((A,C),B,D);
The first predicate asks whether AB is separated from CD; the second asks for the relationships in the given Newick tree. Blank lines separate predicates. Multiple lines within one block form a conjunction: all their relationships must occur.
A partial split such as A B | C D [ E ] leaves E's
placement unspecified. Every line in a block must declare the same taxon
universe as the samples, including unused taxa in brackets. Taxa are
matched by name. Predicate trees supply topology; their branch lengths
do not affect support. Duplicate predicates are removed.
The report begins with input filenames and the random seed, pseudocount, and block size. Each numbered predicate is followed by its per-run and group results. For a group with several runs, PP1-1, PP1-2, and so on are individual runs; PP1 is their pooled result. LOD labels follow the same convention.
For n present observations among N retained trees and pseudocount c:
Each run contributes its pseudocount to the pooled group, so a group of k runs uses k times c on each side. LOD is an odds summary, not a Bayes factor.
The bracketed count after the observations is roughly the number of complete switches out of and back into an event: the number of state changes plus one, divided by two with integer rounding down. More exclamation marks indicate fewer changes. Constant or rarely changing histories do not establish precise support merely because many trees were recorded.
ACT is the estimated autocorrelation time in retained-tree units. Ne is the number of retained trees divided by ACT, an effective sample-size estimate for that predicate. These fields are omitted when there are too few changes to estimate them. Pooled histories concatenate runs, so their transition and autocorrelation summaries can include effects of the joins.
With --bootstrap, parentheses following PP and LOD show central bootstrap intervals with probability --confidence. More than ten bootstrap replicates are needed for intervals to be printed. sigma, when shown for sufficiently changing histories, is the bootstrap standard deviation of the support estimate.
For groups with at least two runs, ASDSF is the
average standard deviation of split frequencies between runs,
considering splits above --min-support in at least one
member. MSDSF is the maximum standard deviation over
the available splits. These use observed frequencies without pseudocount
smoothing. ASDSF is reported as NA when no splits pass the
group's cutoff; MSDSF is NA when the split collection is
empty. min Ne identifies the smallest available
effective sample-size estimate among the group's analyzed predicates. No
single cutoff for these diagnostics establishes convergence.
Compare replicate runs with a reproducible block bootstrap:
trees-bootstrap run1.trees run2.trees --bootstrap --seed 1 > support.txtAsk about the split AB|CD explicitly:
printf 'A B | C D\n' > predicates.txt
trees-bootstrap run1.trees run2.trees --predicates predicates.txt --skip 0For ten retained trees, eight supporting that split, the observed frequency is 0.8. With the default pseudocount, the report gives PP = 9/12 = 0.750 and LOD = log10(9/3) = 0.477. The actual counts remain 1=8 0=2.
Compare two groups and report predicates with a bootstrap-supported difference of more than one unit of log10 odds:
trees-bootstrap run1.trees run2.trees :: run3.trees run4.trees \
--bootstrap --separation 1 --seed 1Export the first group's LOD table:
trees-bootstrap run1.trees run2.trees --LOD-table support-lod.tsv > support.txttrees-consensus(1), partitions-supported(1), trees-to-SRQ(1), trees-distances(1)
BAli-Phy online help: https://www.bali-phy.org/docs.php.
Please send bug reports to bali-phy-users@googlegroups.com.