Skip to content

fix: MA-refactor fallout — qc, track-decorators, filter expressions, mock-fire, stale legacy tags - #123

Merged
mrvollger merged 5 commits into
mainfrom
fix/fire-extract-ma
Aug 13, 2026
Merged

fix: MA-refactor fallout — qc, track-decorators, filter expressions, mock-fire, stale legacy tags#123
mrvollger merged 5 commits into
mainfrom
fix/fire-extract-ma

Conversation

@mrvollger

@mrvollger mrvollger commented Aug 13, 2026

Copy link
Copy Markdown
Member

Systematic sweep for the 0.10 MA-refactor bug class (FIRE quals moved off MSPs onto the fire type). This PR fixes the FIRE-qual overlay consumers:

  • ft qc --m6a-per-msp: is_fire was always false (read MSP quals directly). Now uses the shared FiberseqData::msp_fire_quals() overlay.
  • ft track-decorators: precision-0 MSPs lost their LINKER decorations vs 0.6 (only the fire view was iterated). All MSPs decorate again, and output ordering is now deterministic (was HashMap-ordered).
  • -x 'qual(msp)' filter expressions: compared against always-zero MSP quals, so >N dropped every MSP including called FIREs and <N kept them; len(msp) orphaned paired fire entries. Fire quals are overlaid by molecular start and msp/fire are dropped by a shared kept-start set.
  • ft mock-fire: emitted fire-only annotations invisible to msp-driven consumers; now writes the msp set alongside fire, matching real fire-scored records.
  • Doc cleanup: retired stale AL/separate-lengths references (lengths are inline in MA:Z).

Every fix has regression coverage: insta snapshots pin the extract/qc/decorator FIRE rows, plus assertion tests for the filters and mock-fire tag layout. 20 regression tests pass; fmt/clippy clean.

Related PRs: #124 carries the legacy-tag hygiene (provenance-checked stripping of consumed ns/nl/as/al/aq + fibertig tags) and the Ma/Aq/An read-tolerance helper, split out of this PR. Still outstanding for their own PRs: the py-ft port (compile-dead since 0.10) and the molecular-annotation python soft-clip liftover offset.

🤖 Generated with Claude Code

@mrvollger
mrvollger force-pushed the fix/fire-extract-ma branch from 7b7b8cb to c9ad8ba Compare August 13, 2026 16:39
…IRE MSPs

Same bug class as the fire --extract fix: since the MA-spec refactor
(0.10), FIRE quals live on the `fire` annotation type, not the MSPs.
`ft qc --m6a-per-msp` read the MSP qual directly, so is_fire was always
false, and `ft track-decorators` iterated only fire-type annotations, so
precision-0 MSPs (the majority) lost their LINKER decorations relative
to 0.6 output. Factor the overlay into FiberseqData::msp_fire_quals()
and use it in all three consumers (extract, qc, decorator).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@mrvollger
mrvollger force-pushed the fix/fire-extract-ma branch from c9ad8ba to 111abd1 Compare August 13, 2026 16:42
…legacy tags

Three more instances of the 0.10 MA-refactor bug class, found by a
systematic sweep:

- -x 'qual(msp)' compared against MSP quals, which are always 0 post-MA
  (the fire-qual path was gated on fire count == msp count, but fire is
  the p>0 strict subset). '>N' dropped everything including called
  FIREs; '<N' kept them. Overlay fire quals by molecular start and drop
  msp/fire by a shared kept-start set; len(msp) now also drops paired
  fire entries instead of orphaning them.
- mock-fire emitted fire-only annotations, invisible to msp-driven
  consumers; it now writes the msp set alongside fire, matching real
  fire-scored records.
- MA-writing subcommands left consumed legacy tags (ns/nl/as/al/aq,
  fibertig fs/fl/fa) on the record, so legacy readers saw stale calls
  forever and convert-tags could never clean them. write_record now
  strips exactly the tags the reader consumed, with type-checked
  provenance gates shared with read_record: wrong-typed or un-gated
  foreign tags reusing the same names are never touched, and records
  already carrying MA are left alone.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@mrvollger mrvollger changed the title fix: overlay FIRE quals in qc and track-decorators (same MA-refactor bug class as fire --extract) fix: MA-refactor fallout — qc, track-decorators, filter expressions, mock-fire, stale legacy tags Aug 13, 2026
Mitchell R. Vollger and others added 2 commits August 13, 2026 10:21
…A:Z)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ne in MA:Z)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Keeps this PR scoped to the FIRE-qual overlay fixes (qc, decorators,
filter expressions, mock-fire). The write_record legacy-tag hygiene and
its tests move to fix/legacy-tag-hygiene, where they ship together with
the Ma/Aq/An read-tolerance work.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@mrvollger
mrvollger merged commit ecff17a into main Aug 13, 2026
8 of 9 checks passed
@github-actions github-actions Bot mentioned this pull request Aug 13, 2026
mrvollger pushed a commit that referenced this pull request Aug 13, 2026
… branch

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

# Conflicts:
#	tests/regression/fire.rs
mrvollger pushed a commit that referenced this pull request Aug 13, 2026
## 🤖 New release

* `molecular-annotation`: 0.0.2 -> 0.0.3 (✓ API compatible changes)
* `fibertools-rs`: 0.12.1 -> 0.13.0 (✓ API compatible changes)

<details><summary><i><b>Changelog</b></i></summary><p>

## `molecular-annotation`

<blockquote>

##
[0.0.3](molecular-annotation-v0.0.2...molecular-annotation-v0.0.3)
- 2026-08-13

### Fixed

- [**breaking**] write MA-family tags as Ma/Aq/An (SAM local-use
spelling) + legacy-tag hygiene
([#124](#124))
- leading soft clips double-counted in pyMA liftover
([#126](#126))
- MA-refactor fallout — qc, track-decorators, filter expressions,
mock-fire ([#123](#123))
</blockquote>

## `fibertools-rs`

<blockquote>

##
[0.13.0](v0.12.1...v0.13.0)
- 2026-08-13

### Fixed

- [**breaking**] write MA-family tags as Ma/Aq/An (SAM local-use
spelling) + legacy-tag hygiene
([#124](#124))
- make the Read the Docs (py-ft) build independent of the pyft Rust
build ([#127](#127))
- MA-refactor fallout — qc, track-decorators, filter expressions,
mock-fire ([#123](#123))

### Other

- cache cargo artifacts, parallelize jobs and tests
([#128](#128))
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/release-plz/release-plz/).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@mrvollger
mrvollger deleted the fix/fire-extract-ma branch August 13, 2026 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant