Group and sort alignments by molecular annotation - #1876
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
jrobinso
force-pushed
the
group-by-molecular-annotation
branch
from
September 19, 2026 05:22
057401c to
b4e2706
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.
Adds "molecular annotation at " to Group alignments by and "molecular annotation" to Sort alignments by, for BAMs with fibertools annotations. Both appear only when the tags are present, as with the color-by option.
Reads are ranked by what covers the base: FIRE, MSP, nucleosome, reads covering the position with no annotation there, and finally reads that do not cover it. Group-by uses the clicked position, following "base at position"; sort uses the view center and breaks FIRE ties by quality, highest first.
Also available in batch mode:
group MOLECULAR_ANNOTATION_AT_POS chr19:47515230andsort MOLECULAR_ANNOTATION chr19:47515230.Requested in the fiber-seq rendering discussion (#1871).
Testing
Unit tests on the fibertools test BAMs in
test/data/bam/fiberseq: annotation lookup at a position (precedence and interval boundaries), the group counts at chr19:47,515,230 inNAPA.bam(an accessible site — 90 of the 154 reads carry a FIRE there), and the sort order from a shuffled start.🤖 Generated with Claude Code