sumt
sumt computes summary trees and associated statistics from one or more files of phylogenetic trees.
Input trees are typically posterior samples from Bayesian MCMC analyses such as BEAST or MrBayes. They can also be other collections of plausible trees, such as bootstrap replicates.
Installation
This README describes sumt 4.2.1, which requires Python 3.10 or newer and phylotreelib 3.x.
python3 -m pip install sumt
To upgrade an existing installation:
python3 -m pip install --upgrade sumt
Quick start
Download the small BEAST example used below:
curl -L -o primate-mtDNA.trees \
https://raw.githubusercontent.com/agormp/sumt/main/examples/data/primate-mtDNA.trees
Consensus tree
Build a majority-rule consensus tree with mean bipartition lengths, discard 10% burn-in and midpoint-root the result:
sumt --con --biplen --rootmid -b 0.1 primate-mtDNA.trees
This writes primate-mtDNA.con in Nexus format. Use --outformat newick for Newick output or --basename NAME to choose another output prefix.
MCC tree with common-ancestor heights and credible intervals
For rooted clock trees, build an MCC tree with common-ancestor heights and 80% and 95% credible intervals, using two worker processes:
sumt --mcc --caheight --ci 0.8,0.95 -b 0.1 --cpus 2 primate-mtDNA.trees
This writes primate-mtDNA.mcc. Credible intervals are central, equal-tailed intervals based on approximate quantiles. --cik controls their numerical resolution. See the interval guide for details.
Combine independent runs
Input filenames are positional arguments. This example combines two MrBayes runs, discards 25% burn-in from each and reports the average standard deviation of split frequencies:
sumt --con --biplen --rootmid -b 0.25 -s mrbayes.1.t mrbayes.2.t
See the recipes for those example files and for per-file burn-in values.
Choosing a summary
Choose one summary type and one branch-length/node-height method:
| Summary option | Result |
|---|---|
--con |
Majority-rule consensus |
--all |
Consensus with compatible bipartitions added |
--mcc |
Observed rooted topology with the highest clade credibility |
--mbc |
Observed unrooted topology with the highest bipartition credibility |
--hip |
Fully resolved rooted HIPSTR summary |
--mrhip |
HIPSTR favoring clades with more than 50% support, while allowing lower-support clades |
| Length/height option | Estimate |
|---|---|
--noblen |
Topology and support only |
--biplen |
Mean length of each matching bipartition |
--cladeheight |
Mean height where each exact clade occurs |
--caheight |
Mean MRCA height of each summary clade's tips across all input trees |
The height methods are intended for meaningfully rooted clock trees. The option guide explains their assumptions and differences.
Rooting and output
MCC retains the selected topology's root. HIPSTR and mrHIPSTR are rooted by construction. Use these methods with meaningfully rooted input trees.
Consensus and MBC output is unrooted unless a rooting option is requested. Choose midpoint rooting (--rootmid), minimum-variance rooting (--rootminvar) or an outgroup (--rootog TAX[,TAX,...]).
Nexus output declares [&R] for rooted results and [&U] for unrooted results. Summary statistics use seven significant digits. Input annotations are not summarized or copied to the output tree.
--ci 0.8,0.95adds requested credible intervals.--nometaomits statistical annotations but retains the rootedness declaration.--nolabelomits internal support labels.--noblenomits branch lengths and their annotations.--cpus 1runs in one process. Set a larger value for parallel processing, or 0 for automatic selection.
Use sumt --help for all options. See the recipes and option guide for root credibility, topology-probability files, performance tuning and migration from earlier versions.
Citation
If you use sumt in academic work, cite the GitHub repository using GitHub's “Cite this repository” link.
Metadata
Release files for sumt 4.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sumt-4.2.1.tar.gz | 45.4 kB | Without provenance | Details for sumt-4.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sumt-4.2.1-py3-none-any.whl | Python 3 | none | any | Details for sumt-4.2.1-py3-none-any.whl |
Total release size: 75.0 kB
Release files / sumt-4.2.1.tar.gz
| Download URL | sumt-4.2.1.tar.gz |
|---|---|
| Size | 45.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aa0ec885ad2b90b390ad6a9a562f994790bea2e105970b85e36e570315cf94fc
|
|
BLAKE2b-256 checksum How to use checksums |
c6ad10f636d53f6db0503c7b271c664811e419b257e19ce1e8e1d63e991f7197
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.4
|
Release files / sumt-4.2.1-py3-none-any.whl
| Download URL | sumt-4.2.1-py3-none-any.whl |
|---|---|
| Size | 29.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
26b0166da7da3c71c27cc9a94b60db17c17a534cefaccddcf5d48c4a2b064910
|
|
BLAKE2b-256 checksum How to use checksums |
e409c7bd7e56d5890ac84bbf171686bc25fb4f7e19f6eb8996e98fd9ee011c97
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.4
|
Security for sumt 4.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.