-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Add x-axis windowing for long read visualization #160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
jayhesselberth
wants to merge
4
commits into
main
Choose a base branch
from
feature/x-axis-windowing
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
Adds x-axis position windowing to aggregate plots to support visualization of long nanopore reads (1000-2000 nt) without cramming all data into view. ## UI Changes - Added dual-handle range slider (rc-slider) for position range selection - Slider auto-populates min/max from selected reference's BAM alignment data - "Reset to Full Range" button to restore default view - Fixed horizontal scrollbar and control cutoff issues in Plot Options panel ## API Changes - Added x_axis_min/x_axis_max parameters to plotting functions - Added get_reference_range() function to query BAM alignment ranges - Updated SquiggyRuntimeAPI.generatePlot() signature - Added requestReferenceRange message for webview communication ## Implementation - Data windowing approach: filters positions before plotting - Explicit x-axis range setting with Bokeh Range1d - Handles position-keyed dicts (pileup, signal) vs non-position dicts (mods) - Implemented for aggregate.py strategy ## Styling Fixes - Fixed Plot Options panel overflow issues - Added box-sizing: border-box globally - Prevented horizontal scrolling in webview base HTML - Uniform padding matching other panels (Samples) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Implements windowing for remaining plot strategies and fixes lints. ## Implementation - **single_read.py**: Data filtering based on x-axis type (time, position, genomic) - Filters signal arrays and seq_to_sig_map - Handles base positions and modification annotations - **eventalign.py**: View windowing with Range1d - Takes precedence over clip_x_to_alignment - Works with both position and time modes - **overlay.py**: View windowing for multi-read overlays - **stacked.py**: View windowing for stacked reads ## Lint Fixes - Added get_reference_range to __all__ in __init__.py - Fixed raise statement to include 'from e' in io.py All plot strategies now support x_axis_min/x_axis_max parameters. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
…owing Remove archived rc-slider dependency in favor of two native HTML number inputs. This eliminates an unmaintained dependency, reduces bundle size by ~36 KiB, and provides better UX for precise position entry. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Update PlotOptionsViewProvider test to include new x-axis windowing fields in aggregate plot event expectations. Also apply code formatting fixes from ruff and prettier. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #160 +/- ##
==========================================
- Coverage 73.47% 71.74% -1.73%
==========================================
Files 27 27
Lines 4404 4538 +134
Branches 883 917 +34
==========================================
+ Hits 3236 3256 +20
- Misses 1168 1282 +114
🚀 New features to boost your workflow:
|
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
Adds x-axis position windowing to aggregate plots to support visualization of long nanopore reads (1000-2000 nt) without cramming all data into view. Users can interactively select a position range using a dual-handle slider, with automatic bounds detection from BAM alignments.
Changes
UI Components
API Updates
x_axis_min/x_axis_maxparameters toplot_aggregate()get_reference_range(bam_path, reference)functionSquiggyRuntimeAPI.generatePlot()signaturerequestReferenceRangeandupdateReferenceRangemessagesPython Implementation
Range1daggregate.pystrategyBug Fixes
box-sizing: border-boxglobally for proper width calculationsTesting
Tested with:
Screenshots
[User to add screenshots showing slider in action]
Future Work
The following plot strategies still need windowing implementation:
single_read.pyeventalign.pyoverlay.pystacked.pyAdditional enhancements:
🤖 Generated with Claude Code