Skip to content

v2.6.6: per-read perf rewrite + apply throughput regression fix

Choose a tag to compare

@mtcicero26 mtcicero26 released this 16 Apr 17:43
· 502 commits to main since this release

⚠️ Reverse-strand MM/ML parsing bug — UPGRADE TO v2.9.0

Versions 2.6 – 2.8.2 had a parser bug that shifted m6A/m5C modification positions on reverse-aligned reads (~24 bp median), causing ns/nl/as/al/MA/AQ tags to be wrong on reverse reads. Forward reads unaffected. DAF with IUPAC (R/Y) encoding unaffected.

Upgrade: pip install --upgrade fiberhmm (v2.9.0+). See v2.9.0 release notes for details.


Bugfix release rolling up the perf and stability work since 2.6.5.

Performance

  • 9× faster context code encoder via numba single-pass kernel (0c2d88b)
  • Slim IPC for recall-tfs: workers now exchange compact payloads instead of full SAM strings — eliminates 4 to_string/fromstring calls per read (b244376)
  • Bounded in-flight queue prevents recall-tfs OOM under slow downstream (sort backpressure, slow disk) — working set capped at (n_cores + 2) × chunk_size reads (bc99fdb)
  • Vectorized hot paths: MM/ML skip-count parse, IUPAC R/Y conversion, ML→bytes IPC (b42485a)
  • fiberhmm-apply 3–5× speedup on Hia5 PacBio: replaced pysam.modified_bases (Python iteration over every modification) with our existing vectorized parse_mm_tag_query_positions (586c557)
  • Restored fork on Linux Py<3.14 (~10× ramp-up improvement on long jobs); spawn remains the default on Py≥3.14 where fork+pysam segfaults reliably. Override via FIBERHMM_MP_CONTEXT=spawn|fork (586c557)

Bug fixes

  • Guard against pysam segfault on zero-modification reads (871f3c4)
  • Empty-ML guard now O(1); was previously materializing a 5000-element PyInt list per read (8622f9c)

CLI

  • fiberhmm-run: new --sort-threads (default 2), --sort-memory (default 512M), --sort-tmp flags expose samtools sort controls — fixes the memory balloon when running multiple pipelines in parallel (b244376)

Install

pip install --upgrade fiberhmm

🤖 Generated with Claude Code