Skip to main content

sumt

PyPI version PyPI downloads

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.0, 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.95 adds requested credible intervals.
  • --nometa omits statistical annotations but retains the rootedness declaration.
  • --nolabel omits internal support labels.
  • --noblen omits branch lengths and their annotations.
  • --cpus 1 runs 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.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sumt 4.2.0
File Size Uploaded Provenance Actions
sumt-4.2.0.tar.gz 45.3 kB Without provenance Details for sumt-4.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sumt 4.2.0
File Interpreter ABI Platform Actions
sumt-4.2.0-py3-none-any.whl Python 3 none any Details for sumt-4.2.0-py3-none-any.whl

Total release size: 75.0 kB

Release files / sumt-4.2.0.tar.gz

Download URL sumt-4.2.0.tar.gz
Size 45.3 kB
Tags Source
SHA-256 checksum
How to use checksums
7090aa2d277b3d3231fd95d7374fc0e89f337bc1082cfda623efc325441abe01
BLAKE2b-256 checksum
How to use checksums
e58db8b471cab784dd7ae5855423bb6a461cfe93639dae16a3b42a2195c415dd
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.0-py3-none-any.whl

Download URL sumt-4.2.0-py3-none-any.whl
Size 29.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
82a4eeb479ef04bb9d3131fa74d45ecb79e2248721b83ed7618202bb8fa36809
BLAKE2b-256 checksum
How to use checksums
b4462d9981d3e9b2a34d891d4800eef6a822ae15f89c2d9001b103767ebf213b
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.0

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.

Release history Release notifications | RSS feed

This release

4.2.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page