Skip to content

Latest commit

 

History

History
67 lines (58 loc) · 3.64 KB

File metadata and controls

67 lines (58 loc) · 3.64 KB

Changelog

All notable changes to this project are documented here. The format is loosely based on Keep a Changelog, and the project follows Semantic Versioning. The three published artifacts — the nj crate (crates.io), nj_py (PyPI), and @holmrenser/nj (npm) — share a single version, bumped together via make bump-{patch,minor,major}.

[Unreleased]

Added

  • Among-site rate-variation corrections for the distance models: a gamma rate-heterogeneity shape parameter (gamma_shape, Jin & Nei 1990) and a proportion of invariant sites (p_invar). For distance methods both are exact closed-form corrections to each model's −ln(...) step, so no discrete rate categories are needed; they apply to every correctable model (JukesCantor, Kimura2P, TajimaNei, Tamura, Poisson, KimuraProtein) and compose as +I+Γ. The gamma correction converges back to the uncorrected model as the shape parameter grows; PDiff (raw p-distance) is unaffected. Exposed across the CLI (-g/--gamma-shape, -i/--p-invar), Python, and WASM bindings, with NJError::InvalidGammaShape / NJError::InvalidPInvar for out-of-range values.
  • Three substitution models: TajimaNei (Tajima-Nei 1984, DNA — corrects Jukes-Cantor for unequal base frequencies), Tamura (Tamura 1992, DNA — Kimura two-parameter with a GC-content correction), and KimuraProtein (Kimura 1983, protein — empirical correction to the Poisson distance). All are closed-form and reduce to the model they extend under the appropriate conditions (Tajima-Nei → Jukes-Cantor at equal frequencies, Tamura → Kimura-2P at GC = 0.5). Exposed across the CLI, Python, and WASM bindings.

[0.0.23] - 2026-06-04

Fixed

  • Protein sequences are now encoded case-insensitively; lowercase residues were previously mapped to X, silently corrupting protein alignments.
  • Newick output now single-quotes identifiers containing whitespace or reserved characters (()[]{}',:;), producing valid Newick for names with spaces, etc.
  • Bootstrap replicate failures now propagate as errors instead of panicking a worker thread.

Added

  • New simd Cargo feature providing an explicit core::simd distance kernel (~5-7x faster distance computation). It requires a nightly toolchain (unstable portable_simd); published wheels enable it, while crate/source builds fall back to the autovectorized scalar path on stable.
  • Duplicate sequence identifiers are rejected with NJError::DuplicateIdentifier (they previously corrupted bootstrap clade counting).
  • A Warning log event is emitted for all-gap sequences (whose distances are 0).
  • Language bindings surface error kind: Python raises ValueError for usage errors and RuntimeError for internal failures; WASM throws an Error whose name is the stable error code. Failing user callbacks are logged rather than silently dropped.
  • Criterion benchmarks (make bench) and proptest property + golden-tree tests.
  • scripts/check-versions.sh and a CI job that verify the three package versions stay in sync.
  • SequenceObject::is_empty() companion to len().

Changed

  • The cli feature now implies parallel, so the installed nj binary runs bootstrap and distance computation multi-threaded by default; the bare library stays Rayon-free unless parallel is requested. Cap workers with -t/--num-threads.
  • Python wheels are built once per platform as a stable-ABI (abi3-py310) wheel covering CPython 3.10+, replacing the per-minor-version build matrix.

[0.0.22] and earlier

See the Git tag history (git tag) and the GitHub releases page for prior versions.