-
Notifications
You must be signed in to change notification settings - Fork 387
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
Add feature threshold indicator to zoom widget #1196
Conversation
b95f417
to
d2b87f2
Compare
This is a neat feature, however we can have many tracks loaded each with a unique visibility window. Think of 10 or 20, a combination of VCF, bigBed, and indexed annotations. This is not uncommon as you might think. |
@jrobinso If they all implement |
|
||
transGraphics.setColor(TRANSPARENT_BLUE); | ||
Rectangle maxZoom = zoomLevelRects[zoomLevelRects.length - 1]; | ||
for (Integer window : visibilityThresholds) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a bug here somewhere, array index can be negative. I'll drop more details in the "conversation" widget
@lbergelson Looks good overall, but there is a bug. I'm not sure how I got in this state, but here are the previous steps (1) load the session test/sessions/base_mods/HiFi_basemodfications.xml from the repository (File > Load Session...)
|
@jrobinso Good catch. I'll look into that. |
* Add an indicator to show which zoom level will start dispalying features/reads * closes #1192
Update text session xml
* extracted a log2 function instead of using a wierd static log2 constant everywhere
ad551ef
to
82813f4
Compare
@jrobinso I believe I have fixed the issue. It seemed to occur when the feature window was larger than the current chromosome length causing it to produce a negative log value. I capped the window length when calculating the zoom now so there shouldn't be anymore negative numbers there. |
Looks good now |
@jrobinso
This is a minor feature that I have wanted in the past so I figured I would try implementing it. Good learning project to play with some of the stuff I haven't touched yet.
This is what it looks like when there are 2 different thresholds set (variants AND reads) notice the two shades to indicate the separate thresholds.
I implemented it in a kind of hacky way so I'd really like to hear feedback about better ways to get the threshold from the tracks into the widget without poling through them each time you redraw. It's probably not that expensive so it may not be worth doing anything smarter.
Also happy to change the look of it.