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
New display type for drawing arcs #2534
Conversation
may want to use a package.json that is similar to other plugins in the monorepo, the external plugin template may not work with the build system |
forgot to push it...lemme know what changes further need to be made to it ? |
interested user looking for this on jb2 elsiklab/sashimiplot#10 |
Codecov Report
@@ Coverage Diff @@
## main #2534 +/- ##
==========================================
+ Coverage 60.86% 60.92% +0.05%
==========================================
Files 547 551 +4
Lines 25727 25792 +65
Branches 6078 6084 +6
==========================================
+ Hits 15659 15714 +55
- Misses 9743 9753 +10
Partials 325 325
Continue to review full report at Codecov.
|
we may want to review whether we want to do inter-region arcs with this. it would be useful for things like connecting structural variants probably |
example: connecting an arc from chr1 to chr2 |
that is not currently possible on this branch AFAIK |
correct, would you like it to be done as a part of this PR? |
another thing that could be considered is: automatically generating an arc track from an RNA-seq data BAM file (for getting an automatic sashimi plot, this can be done for sashimiplot in jb1) another application of arcs to structural variants is having an arc for each pair of reads, this was done in jb1 and would be great in jb2, but would especially be nice to have with arcs that can go across mutliple displayed regions |
I guess it would be interesting if it could be considered...if needed it could be done separately as a separate renderer or display but i think having it done once and for all would be quite cool. also, see the jbrowse 1 link where it involves many many arcs...could possibly slow down with svg |
notes from meeting:
|
This PR includes adding the LinearArcDisplay type to the FeatureTrack. While this allows for the arc display to be accessible to users, using it feels a little awkward. Given that a FeatureTrack isn't 'meant' to be viewed as an arc, it just doesn't make sense to allow a user to toggle these displays, and having the ability to do such a thing so readily may confuse them. To this end, we may want to re-evaluate how we expose toggling track display types to the user. This may involve an extra layer of UI (e.g., a display selector), aliases for the 'internal' names for display types, and/or tooltips. I feel that adding one, or a combination, of these suggestions would make it easier to add displays like this to tracks in the future, while maintaining a clear intention to the user and communicating how tools are meant to be used without referring to docs or external resources. That being said, because there isn't a satisfactory solution at the moment for this, we still feel like the PR should go through to make this utility available to users while we consider how to better expose display types to users. |
#2550 potential solution to the question of clarity in terms of changing the displays mentioned above (i.e. provides an alias and a description of the displays) |
discuss in meeting : potentially add a dialog for changing display that provides the description clearly to the user without the concern for a description being too long for the track menu |
I made a small change that makes the arcs have slightly different heights by making the arc height proportional to the Math.log of feature width (end-start)
before after that makes the larger arcs maybe more easily clickable in some cases |
did you end up pushing this? |
did not push that change yet. was a little bit wondering if the label height (78px thing) should be parameterized if the height becomes configurable |
so the equation above didn't end up working because our curves are actually cubic (i thought they were quadratic) slight modification to the calculation, which is actually a lot more straight forward
this formula is plucked from https://en.wikipedia.org/wiki/B%C3%A9zier_curve#Cubic_B%C3%A9zier_curves t is always going to be 0.5 because that's where we want on the bezier curve on the component i've got demo: |
awesome :) can you add the wiki link next to the formula, then we can merge! |
note: making it capable of cross-region arcs would be very good for SV visualization also #2569 if you want to keep that on the burner |
summary of changes