Releases: broadinstitute/delphy
1.3.2
Bug fixes
Three related bugs that caused hangs or out-of-memory crashes when the Gibbs sampler for mu drives the mutation rate to extremely small values (observed on datasets with very few or zero mutations, e.g., WCSS 04_free_exp_pop/sims/sim_048):
- Fix infinite loop in
sample_mutational_historywhenmu*Tis tiny — Floating-point cancellation inlog(p_0/(1-p_1))caused the no-delta sampling loop to run forever. Fixed with a Taylor expansion for smallmu*Tand a skip guard. - Cap root displace proposal scale in
inner_node_displace_move— With tinymu, the Gaussian proposal scale became ~330 million years, causing the coalescent prior to allocate GiB of grid cells. Cappeddelta_scaleto the tree span. - Cap subtree slide proposal scale in
subtree_slide_move— Same issue as above but in a different move type. Cappeddelta_scaleto the tree span.
Diagnostics
- Warning in
ensure_space— The coalescent prior's grid allocator now logs a warning to stderr when allocating more than 10,000 new cells, making similar issues easier to detect in the future.
1.3.1
Bug fix
- BEAST log output: consistent calendar-aware time conversion. The BEAST X and BEAST 2 log output in
beasty_output.cppmixed two conventions for converting internal times (days since 2020-01-01) to years:to_linear_year(calendar-aware, accounts for leap years) forage(root), but simple/ 365division forrootHeightandage(TIP). This introduced a systematic error of ~2 days over multi-year spans for datasets in 2025, a small but perceptible delta that will only grow in the future. All absolute time and time-delta conversions in BEAST log output now useto_linear_year/delta_linear_years. Rate and magnitude conversions (* 365// 365) and Newick tree branch lengths are unchanged.
1.3.0
New Features
-
Flexible prior on mutation rate (mu): Configurable Gamma(alpha, beta) prior via
--v0-mu-prior-alpha/--v0-mu-prior-betaor--v0-mu-prior-mean/--v0-mu-prior-stddev. Default recovers the existing uniform prior. Initial mu defaults to the prior mean when a proper prior is specified. -
Flexible prior on population size (n0): Configurable Inverse-Gamma(alpha, beta) prior via
--v0-pop-n0-prior-alpha/--v0-pop-n0-prior-betaor mean/stddev variants. Default recovers the existing Jeffreys (1/x) prior. -
Flexible prior on growth rate (g): Configurable Laplace prior with adjustable location, scale, and optional bounds via
--v0-pop-g-prior-*options. Includes an exponential distribution shorthand (--v0-pop-g-prior-exponential-with-mean). -
Flexible prior on Skygrid N_bar: Configurable Inverse-Gamma prior on the geometric-mean effective population size across Skygrid knots via
--v0-skygrid-nbar-prior-*options. Conjugate with the coalescent likelihood, preserving exact Gibbs sampling. -
Skygrid knot date control: New
--v0-skygrid-first-knot-dateand--v0-skygrid-last-knot-dateoptions for explicit control over the Skygrid time range. -
--v0-steps 0and--v0-steps 1now work: Useful for inspecting the initial state or quick smoke tests.
Performance
-
2x speedup on datasets with missing data: Replaced the
slow_elementscoroutine with direct interval-level iteration, eliminating per-site suspend/resume overhead (34% fewer CPU cycles). -
Integrity checks now opt-in in release builds: Previously always-on checks consuming ~23% of runtime are now gated behind
--v0-paranoid.
Bug Fixes
- Fixed undefined behaviour in SPR move branch_info handling.
- Abort with a descriptive error when output files cannot be opened (previously silent failure).
- Print version and help instead of crashing when invoked without arguments.
Other
- Population quantities (n0, g, N_bar, gamma_k) now displayed in year units.
- All new priors are serialized in FlatBuffers and exported to BEAST 2.6.2, 2.7.7, and X XML formats.
- Updated Google Colab notebooks.
- Added Codecov integration.
1.2.2
Release 1.2.2 * Tweaking GitHub CI to automatically create working release artifacts
1.2.1
Release 1.2.1 * Testing GitHub CI's ability to automatically create release artifacts
1.2.0
- Change license to MIT
1.1.6
- Export posterior support in delphy_mcc
- Improve handling of sites with no data at all in MAPLE files
1.1.5
- Fix compilation issues on macos and Ubuntu 22.02
1.1.4
- Efficiency improvements for Skygrid
Release 1.1.3
- Add support for exporting BEAST2 2.7.7 input XML and output log files
- Bugfix for BEAST X 10.5.0 input XML export: fix needless loss of precision in dates