fix(alignments): pileup soft-clip layout cap and sort order (#3471, #4671)#5526
Open
fix(alignments): pileup soft-clip layout cap and sort order (#3471, #4671)#5526
Conversation
Layout used full mismatch soft-clip lengths for collision intervals while region fetch only expands by maxClippingSize (PileupRenderer.getExpandedRegion). Cap left/right expansion per side to match config and reduce pathological layout width with show soft clipping (GMOD#3471). Tests: layoutFeature.test.ts Made-with: Cursor
…lipping (GMOD#4671) PileupLayout relies on processing reads in left-to-right order of the collision interval. Sorting only by genomic start disagrees with expanded left coordinates from soft clips, breaking row hints and spacing. Export getPileupLayoutSpan and use it for the default sort when not using sortedBy. Made-with: Cursor
Author
|
Quick ping: no review comments on this PR yet from my side. I’ve been focusing validation on Thanks! |
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
#3471 — cap layout span
Pileup layout expanded soft-clipped reads using the full
mismatchesclip lengths, while feature fetching only expands the visible block bymaxClippingSize(PileupRenderer.getExpandedRegion). That mismatch could make layout intervals far wider than the data region and stress the pileup layout.Change: cap left and right soft-clip expansion per side to
maxClippingSize, summing clips on each side first then applying the cap. Shared helper:getPileupLayoutSpan.#4671 — sort order vs layout interval
PileupLayoutassumes features are processed in left-to-right order of the collision interval. Sorting only by genomicstartdisagrees with expanded left coordinates when soft clipping is on, which breaks row hints and can produce poor vertical spacing.Change: when not using
sortedBy, sort by layout left edgesfromgetPileupLayoutSpan(tie-break: genomicstart).Testing
Related