Skip to content

fix: --skip-no-m6a skips all reads when MSP annotations are missing#102

Merged
mrvollger merged 1 commit intomainfrom
fix/skip-no-m6a-ont
Mar 18, 2026
Merged

fix: --skip-no-m6a skips all reads when MSP annotations are missing#102
mrvollger merged 1 commit intomainfrom
fix/skip-no-m6a-ont

Conversation

@mrvollger
Copy link
Copy Markdown
Member

@mrvollger mrvollger commented Mar 18, 2026

Summary

  • The --skip-no-m6a flag in ft fire incorrectly skipped all reads when the BAM had valid m6A calls (MM/ML tags) but no pre-computed MSP annotations (as tag)
  • The skip condition rec.m6a.annotations.is_empty() || n_msps == 0 conflated "no m6A" with "no MSPs", causing all ONT reads (which have m6A from dorado but no fiberseq MSP tags) to be skipped
  • Now --skip-no-m6a only checks m6A presence, MSP count is checked separately by --min-msp, and the division-by-zero guard for average MSP size is scoped to when --min-ave-msp-size > 0

Fixes #100

Test plan

  • Verified with the reporter's test BAM: before fix 0/4 reads written, after fix 4/4 reads written
  • All existing tests pass (cargo test)
  • Test with PacBio fiberseq data to confirm no regression

🤖 Generated with Claude Code

…nnotations

The skip condition incorrectly combined m6A emptiness with MSP count,
causing all reads to be skipped when the BAM had m6A calls (MM/ML tags)
but no pre-computed MSP annotations (as tag). This affected ONT data
where dorado provides m6A calls but fiberseq MSP/nucleosome tags are
absent.

Fixes #100

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mrvollger mrvollger force-pushed the fix/skip-no-m6a-ont branch from 84b98f8 to 67120cd Compare March 18, 2026 15:59
@mrvollger mrvollger merged commit 892e033 into main Mar 18, 2026
8 of 9 checks passed
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.

ft fire subcommand with '--skip-no-m6a' flag skips all reads - even those with MM:Z:A+a tag

1 participant