Skip to main content

treedist: command line program for quantifying differences between phylogenetic trees

The command-line program treedist takes as input two or more treefiles and computes various measures of the "distance" between pairs of trees. The program can also output information about how many and what bipartitions differ between trees.

Availability

The treedist source code is available on GitHub: https://github.com/agormp/treedist. The executable can be installed from PyPI: https://pypi.org/project/treedist/

Installation

python3 -m pip install treedist

Dependencies

treedist relies on the phylotreelib library, which is automatically included when using pip to install.

Overview

  • Input:
    • Two or more files containing phylogenetic trees in NEXUS or Newick format
    • Trees do not need to have identical leaves, but each pair of trees need to share at least 4 leaves (all leaves that are not shared will be automatically pruned before computing tree distances).
  • Output:
    • Different measures of treesimilarity (Robinson-Foulds symmetric distance, normalised RF, normalised similarity)
    • Summaries of what bipartitions that differ or are shared between trees

Usage

Usage: treedist [options] TREEFILE1 TREEFILE2 [TREEFILE3 ...]

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -I FORM, --informat=FORM
                        format of tree files: NEXUS or newick [default:
                        newick]
  -d, --symnormdist     print normalized symmetric distance
  -s, --symdist         print symmetric distance
  -b, --bipnumbers      print no. total, shared, and unique bipartitions for
                        each tree
  -u, --uniquelist      print list of unique bipartitions for each tree
  -c, --commonlist      print list of bipartitions trees have in common
  -l, --labels          also print branch labels for bipartitions (requires -c
                        or -u)
  -o, --oneline         oneline output of normalized symmetric similarities
  -n, --namesummary     Print names of leaves that are shared between trees,
                        and leaves that are discarded
  --collapselen=BRLEN[,BRLEN,...]
                        Collapse branches shorter than this (comma-separated
                        list: individual cutoffs for trees)
  --collapsefrac=FRAC   Collapse branches shorter than FRAC fraction of
                        treeheight (of minimum variance rooted tree)
  --collapsesupport=SUPPORT
                        Collapse branches with less clade support than this
                        (must be number in [0,1])

Usage examples

TBD

Metadata

Release files for treedist 1.0.1

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

Source distribution (sdist)

Source distribution for treedist 1.0.1
File Size Uploaded
treedist-1.0.1.tar.gz 18.1 kB Details

Built distribution (wheel)

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

Total release size: 36.8 kB

Release files / treedist-1.0.1.tar.gz

Download URL treedist-1.0.1.tar.gz
Size 18.1 kB
Tags Source
SHA-256 checksum
How to use checksums
274f37dbf6c5fd4e98500a2b665ba5d786034082ccf0b16cd76682a3707df956
BLAKE2b-256 checksum
How to use checksums
5e7b07c33e7ebf038cb0118fadfaaba7d498cca4e920ec5b8efcfa09f443909b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.6.0 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

Release files / treedist-1.0.1-py3-none-any.whl

Download URL treedist-1.0.1-py3-none-any.whl
Size 18.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
57143a539650854f781170900070457fabfee10f51f9949b4d4762e3a0fbee73
BLAKE2b-256 checksum
How to use checksums
01027c78a72d5dcd3830c30b3889ab6ff46ff1b3b78ee0caaa7a1d1e24749310
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.6.0 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

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