Skip to content

Group and sort alignments by molecular annotation - #1876

Merged
jrobinso merged 2 commits into
mainfrom
group-by-molecular-annotation
Sep 21, 2026
Merged

jrobinso merged 2 commits into
mainfrom
group-by-molecular-annotation

Conversation

@jrobinso

Copy link
Copy Markdown
Contributor

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:47515230 and sort 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 in NAPA.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

jrobinso and others added 2 commits September 18, 2026 21:57
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@jrobinso
jrobinso force-pushed the group-by-molecular-annotation branch from 057401c to b4e2706 Compare September 19, 2026 05:22
@jrobinso
jrobinso merged commit 57e31ba into main Sep 21, 2026
2 checks passed
@jrobinso
jrobinso deleted the group-by-molecular-annotation branch September 21, 2026 04:00
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