Skip to content

Releases: PathoGenOmics-Lab/distree

v1.0.1

Choose a tag to compare

@github-actions github-actions released this 29 Jul 09:11

The first release since 1.0.0, and mostly a correctness one. The expensive class
of bug here is not a crash: it is a run that returns a matrix that looks
entirely reasonable and is wrong. Most of what follows is that.

📖 Documentation: https://pathogenomics-lab.github.io/distree/ ·
🎓 Tutorial ·
📋 Full changelog

Highlights

Trees that used to fail, or quietly lie

  • A leading [&R] / [&U] rooting marker, which IQ-TREE, MrBayes and BEAST all
    write, made a tree unparseable.
  • Non-ASCII labels came out as mojibake, so any name with an accent, a Greek
    letter or CJK text stopped matching the samples it came from.
  • A truncated tree was accepted, with every dangling internal node silently
    losing its branch length. A file holding several trees produced a matrix for
    the first one without saying so.
  • A:1e910 parsed as infinity, giving a matrix of inf with NaN down the
    diagonal and an exit code saying success.
  • --midpoint --topology added a hop to every distance crossing the midpoint.
  • Negative patristic distances were rounded up to zero, claiming two distinct
    taxa were the same sample.

Faster

Rows are computed in batches rather than one parallel job each, every worker
formats its own output, and fixed-precision formatting is done by hand where the
rounding is unambiguous. An 8,000-tip run went from 2.52 s to 0.13 s on 14
cores; a 20,000-tip matrix from 10.6 s to 1.0 s. Output is byte-identical.

New

  • --npy writes a NumPy array of 64-bit floats: exact, half the size of text,
    2.6x faster. With --lower, the condensed vector SciPy reads directly.
  • --taxa FILE restricts the matrix to a list of tips, with the distances the
    full tree gives.
  • --stats prints a run summary to stderr.
  • Gzipped input is read directly, detected by content rather than file name.

Checked against something other than itself

Distances are cross-validated against R's ape (cophenetic.phylo, vcv.phylo)
and phangorn::midpoint over 250 generated trees: agreement to under 1e-9, and
exact for edge counts. The parser and pipeline are fuzzed. 96 tests, up from 31.

Breaking changes

The parser is stricter. All of these were previously accepted:

  • A file holding more than one tree is now an error. Split it first.
  • A truncated tree is an error rather than being closed at end of input.
  • Trailing content after the tree, and unclosed quotes or comments, are errors.
  • A label containing whitespace is rejected in --lower mode, because PHYLIP
    readers treat whitespace as the end of the name.
  • A branch length that is not finite is rejected.
  • --threads 0 and --precision above 30 are rejected.
  • Negative patristic distances are reported rather than rounded to zero.

Install

conda install -c bioconda distree

Or download the binary for your platform below. On macOS, clear the quarantine
flag first: xattr -d com.apple.quarantine distree-macos-aarch64.

Platform Asset
Linux x86-64 distree-linux-x86_64
Linux arm64 distree-linux-aarch64
macOS Apple silicon distree-macos-aarch64
macOS Intel distree-macos-x86_64

distree v1.0.0 🎉

Choose a tag to compare

@Paururo Paururo released this 12 Aug 11:25
6ce2858

We are excited to announce the first official release of distree! This initial version is stable and ready for use.

distree is a command-line tool written in Rust for fast, memory-efficient extraction of distance matrices from Newick phylogenetic trees.

✨ What's in this Release?

This first version provides the core functionalities of distree:

  • Three Distance Modes:
    • Patristic: Sum of branch lengths between pairs of leaves.
    • Topological: Number of nodes between leaves, ignoring branch lengths.
    • LMM (var-covar): Depth of the Most Recent Common Ancestor (MRCA) for use in phylogenetic comparative methods.
  • Optional Midpoint Rooting: Re-root your tree on the fly with the --midpoint flag before calculations.
  • High Performance: Parallel processing and a low-memory streaming approach to handle large-scale trees efficiently.

❤️ Contributors

A special thanks to the contributors for this release:

Paula Ruiz-Rodriguez (@paururo)
Mireia Coscolla (@mireiacoscolla)

Full Changelog: https://github.com/PathoGenOmics-Lab/distree/commits/v1.0.0