Skip to content

FiberHMM 2.13.3 — Fix reverse-strand recall on legacy (v1.0 query-frame) BAMs

Choose a tag to compare

@mtcicero26 mtcicero26 released this 26 Jun 13:45
· 380 commits to main since this release

Correctness fix — reverse-strand recall on legacy BAMs

The 2nd-pass recallers (fiberhmm-recall-tfs and fiberhmm-recall-nucs) read the input BAM's existing ns/nl/as/al and flipped them molecular→seq before recall, assuming the current molecular-frame convention. Legacy/v1.0 BAMs store those tags in SEQ (query) frame and lack the @CO fiberhmm:coord=molecular header marker. Flipping query-frame tags a second time mis-placed every reverse-strand nucleosome/MSP, landing them on accessible (m6A-rich) DNA — e.g. filling open promoter/NFR elements with spurious nucleosome. Forward reads were unaffected (the frames coincide); reverse reads (~half the data) were corrupted.

Verified on real fiber-seq data: m6A inside reverse-read nucleosomes dropped from 0.064 (broken double-flip) → 0.011 (correct, nucleosome on protected DNA).

Fix

  • Auto-detect the input frame from the @CO fiberhmm:coord=molecular marker (present → molecular, flip; absent → legacy seq-frame, use as-is).
  • New --input-frame {auto,molecular,query} (default auto) to override detection.
  • The CLI warns when it falls back to legacy seq-frame handling.
  • Molecular-frame input (current FiberHMM output) is unchanged.
pip install -U fiberhmm