fix: --skip-no-m6a skips all reads when MSP annotations are missing#102
Merged
fix: --skip-no-m6a skips all reads when MSP annotations are missing#102
Conversation
…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>
84b98f8 to
67120cd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--skip-no-m6aflag inft fireincorrectly skipped all reads when the BAM had valid m6A calls (MM/ML tags) but no pre-computed MSP annotations (astag)rec.m6a.annotations.is_empty() || n_msps == 0conflated "no m6A" with "no MSPs", causing all ONT reads (which have m6A from dorado but no fiberseq MSP tags) to be skipped--skip-no-m6aonly 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 > 0Fixes #100
Test plan
cargo test)🤖 Generated with Claude Code