Skip to content
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

Create multi-region arc display type for variant tracks #4045

Merged
merged 17 commits into from
Nov 6, 2023
Merged

Conversation

cmdcolin
Copy link
Collaborator

@cmdcolin cmdcolin commented Nov 6, 2023

This adds a new display type LinearPairedArcDisplay, that is main thread rendered, which has generally been useful for creating multi-region displays (hard to do multi-region with the current block based track types)

Summary

  • allows BEDPE files to be loaded via jbrowse add-track
  • makes BEDPE files of type VariantTrack
  • allows user to choose the arc display using the track menu on VariantTrack types
  • the LinearPairedArcDisplay render breakends (e.g. <BND>, <TRA>, and long features like <DEL>,<INV>,etc.
  • constructs a default tooltip with SV type and feature name
  • currently uses SVG, which has nice mouse events, but could potentially consider canvas if we find svg is slow or gets overloaded with large files
  • height of arcs automatically adjusts to current display height, similar to LinearReadArcsDisplay

example screenshot on volvox

image

fixes #3790
fixes #2548 (somewhat fix, this PR makes new display type specific to variant arcs for this, but this may be the most common reason for multi-region arcs)

@github-actions github-actions bot added the needs label triage Needs a label to show in changelog (breaking, enhancement, bug, documentation, or internal) label Nov 6, 2023
@cmdcolin cmdcolin added enhancement New feature or request and removed needs label triage Needs a label to show in changelog (breaking, enhancement, bug, documentation, or internal) labels Nov 6, 2023
@cmdcolin
Copy link
Collaborator Author

cmdcolin commented Nov 6, 2023

note that even the regular LinearArcDisplay may benefit from being main-thread multi-region renderer capable. for example, if we do collapse introns, and have a junctions.bed connecting introns, then the arcs will not have 'discontinuities'

Copy link

codecov bot commented Nov 6, 2023

Codecov Report

Merging #4045 (b3d77a5) into main (f0063a8) will decrease coverage by 0.40%.
The diff coverage is 16.92%.

@@            Coverage Diff             @@
##             main    #4045      +/-   ##
==========================================
- Coverage   63.63%   63.23%   -0.40%     
==========================================
  Files        1033     1044      +11     
  Lines       30319    30534     +215     
  Branches     7224     7271      +47     
==========================================
+ Hits        19293    19308      +15     
- Misses      10855    11055     +200     
  Partials      171      171              
Files Coverage Δ
...ins/alignments/src/shared/BaseDisplayComponent.tsx 90.47% <100.00%> (-0.83%) ⬇️
...ins/arc/src/LinearPairedArcDisplay/configSchema.ts 100.00% <100.00%> (ø)
...kpointSplitView/components/BreakpointSplitView.tsx 100.00% <100.00%> (ø)
...plitView/components/BreakpointSplitViewOverlay.tsx 100.00% <100.00%> (ø)
plugins/dotplot-view/src/DotplotReadVsRef/index.ts 100.00% <100.00%> (ø)
...aseLinearDisplay/models/BaseLinearDisplayModel.tsx 85.92% <100.00%> (+0.10%) ⬆️
...me-view/src/BaseLinearDisplay/models/renderSvg.tsx 95.45% <ø> (ø)
plugins/sv-inspector/src/SvInspectorView/index.ts 100.00% <100.00%> (ø)
products/jbrowse-cli/src/commands/add-track.ts 84.21% <100.00%> (+0.22%) ⬆️
products/jbrowse-desktop/src/corePlugins.ts 100.00% <ø> (ø)
... and 14 more

... and 4 files with indirect coverage changes

📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today!

Copy link
Contributor

@carolinebridge carolinebridge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks really good, don't see any usability issues.

Random thoughts:

  • i can't find the ticket, but i'm reminded of an idea suggested awhile back to add tooltips / info / context to certain actions like picking a display type that might not show a helpful view depending on the data provided
  • we have "zoom in to see data"... what about "zoom out to see data"? the arc view seems to shine when zoomed all the way out, maybe a prompt to inform the user the visualization might be enhanced if they zoom out? is there a use case for that?
  • do we have enough discoverability in our documentation for cross-regional visualizations / data rendering? we've got a ton of support for it at this point might be worth having a dedicated page for it in our user guide

@cmdcolin
Copy link
Collaborator Author

cmdcolin commented Nov 6, 2023

i can't find the ticket, but i'm reminded of an idea suggested awhile back to add tooltips / info / context to certain actions like picking a display type that might not show a helpful view depending on the data provided

yep I think it's #3854 probably still a good endeavor

we have "zoom in to see data"... what about "zoom out to see data"? the arc view seems to shine when zoomed all the way out, maybe a prompt to inform the user the visualization might be enhanced if they zoom out? is there a use case for that?

possibly ya...two sort of related ideas could be a) right clicking an arc, then select "Zoom to feature" (jbrowse 1 actually had a zoom to feature style right click) and b) "Zoom in on the ends of feature in split view" or something like this, where it just creates a multi-region view focused on the ends of the feature, which could help to visualize large deletions or other SVs...

do we have enough discoverability in our documentation for cross-regional visualizations / data rendering? we've got a ton of support for it at this point might be worth having a dedicated page for it in our user guide

yes could be worthwhile, or at least expanding documentation around the features that use this mode

@cmdcolin cmdcolin merged commit e396d2a into main Nov 6, 2023
11 checks passed
@cmdcolin cmdcolin deleted the bedpe_arcs branch November 6, 2023 19:02
@cmdcolin
Copy link
Collaborator Author

cmdcolin commented Nov 6, 2023

BEDPE tracks were already specified as "VariantTrack" in the "guessTrackType extension point" so the add-track CLI addition is 'copasetic' :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
2 participants