Skip to content

fix(alignments): pileup soft-clip layout cap and sort order (#3471, #4671)#5526

Open
Abdeltoto wants to merge 2 commits intoGMOD:mainfrom
Abdeltoto:fix/3471-pileup-softclip-layout-cap
Open

fix(alignments): pileup soft-clip layout cap and sort order (#3471, #4671)#5526
Abdeltoto wants to merge 2 commits intoGMOD:mainfrom
Abdeltoto:fix/3471-pileup-softclip-layout-cap

Conversation

@Abdeltoto
Copy link
Copy Markdown

@Abdeltoto Abdeltoto commented Mar 31, 2026

Summary

#3471 — cap layout span

Pileup layout expanded soft-clipped reads using the full mismatches clip lengths, while feature fetching only expands the visible block by maxClippingSize (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

PileupLayout assumes features are processed in left-to-right order of the collision interval. Sorting only by genomic start disagrees 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 edge s from getPileupLayoutSpan (tie-break: genomic start).

Testing

pnpm exec jest --selectProjects default --testMatch="**/layoutFeature.test.ts"

Related

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
@Abdeltoto Abdeltoto changed the title fix(alignments): cap pileup soft-clip layout span by maxClippingSize fix(alignments): pileup soft-clip layout cap and sort order (#3471, #4671) Mar 31, 2026
@Abdeltoto
Copy link
Copy Markdown
Author

Quick ping: no review comments on this PR yet from my side.

I’ve been focusing validation on webgl-poc lately (see update on #5525). If this pileup soft-clip / sort-order fix is still something you want on main alongside the WebGL work, I’m happy to rebase or adjust after feedback — otherwise I can leave it parked until you have bandwidth.

Thanks!

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