-
Notifications
You must be signed in to change notification settings - Fork 243
splice junction track #1019
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
splice junction track #1019
Conversation
| dataRange = autoscale(options.genomicState.chromosome.name, mergedFeatures); | ||
|
|
||
| //IGVGraphics.fillRect(options.context, 0, options.pixelTop, options.pixelWidth, options.pixelHeight, {'fillStyle': "rgb(255, 255, 255)"}); | ||
|
|
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.
I saw a lot of the tracks do IGVGraphics.fillRect(options.context, 0, options.pixelTop, options.pixelWidth, options.pixelHeight, {'fillStyle': "rgb(255, 255, 255)"});
before rendering. I added it here, but then commented it out because everything seemed to work without this. Should I reenable it?
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.
Not sure myself, I'm just now pivoting back to igv.js (from IGV) and will give this a good look today and tomorrow.
|
@bw2 I can't access the test data for the example, it needs a billable account. Could you put them somewhere public or create a small test case and zip and attach it here? Thanks. |
|
Yes, let me create a few small test data files and post them here. |
|
These are the test files referenced by examples/spliceJunctionTrack.html |
|
I updated the files to use gffTags and added track configs for filtering and drawing based on the gffTag values. I tried adding popupData, but got stuck because MergedTrack.getFeatures returns an array of featureLists but the findOverlaps code expects a featureList. I can flatten the featureList to get it to "work", but not sure where best to do that. |
|
@bw2 I'm not sure either offhand. When you feel like you are finished other than popup text let me know and I will pull and look into popup data. This probably needs something new for merged tracks, as in merged tracks in general not just this specific case. |
|
That makes sense. I'm also not sure how to detect clicks on bezier curves. |
|
@bw2 Hit detection on bezier curves is tricky. If you look at the sashimi plot repo you'll see what I did. Basically I create a canvas (not displayed) and draw a new closed path surrounding the original curves, using info stored on the feature itself when they are first drawn, IIRC. Then there is a canvas function to detect hits on a path. This took a bit of trial and error, but it works. I'm leaving for vacation tomorrow (family), you might not hear back until I return. |
|
Oh, I see, that's neat. The junctions track will need to save additional values that it currently computes on render. |
|
Have a good vacation! |
|
Probably another flaw in the meged tracks implementation, independent of
this. I will take a good fresh look at that.
…On Mon, Nov 25, 2019 at 11:58 AM bw2 ***@***.***> wrote:
Oh, I see, that's neat. The junctions track will need to save additional
values that it currently computes on render.
The only other issue I'm aware of in my current code are is if I use the
gear setting to increase track height, it correctly adjusts the wig track,
but the splice junctions height doesn't get adjusted.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1019?email_source=notifications&email_token=AAHD2HCFS5VZSGZMOJDAPMLQVQU7BA5CNFSM4JMQCBG2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFDTXLI#issuecomment-558316461>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAHD2HD6YZYI55WWOMBBY4LQVQU7BANCNFSM4JMQCBGQ>
.
|
|
this is a simple ui for looking at the example tracks and track configs |
|
@bw2 I like the UI control for an application, not sure where it fits in the igv.js component but we'll work on that. Could you make the example files in dev/spliceJunctions.html public, or create another example with public files? I get 403 for those files when trying to run it. Thanks. |
|
Hi Jim,
I've copied the files to a public bucket
(gs://seqr-hail/splice_junction_track_test_cases)
and updated the paths in spliceJunctions.html accordingly. Let me know if
you have trouble accessing.
Otherwise, do you want to copy them to the s3 bucket used by other examples?
As far as the UI control panel, it's a side project I'm working on to make
it easier for people in our group to use the tracks, but didn't think it
should be merged into igv.js.
…-Ben
|
…for junctions that won't be rendered
|
Also, one more known issue - the wig coverage track renders fine without being part of a 'merged' track, but I can't figure out how to get the 'junctions' track to render by itself. If it's not inside a 'merged' track, it looks like something is painting a white rectangle over part of it, but I can't figure out where. This is what it looks like when it's not in a merged track: |
|
@bw2 This track (the junction track) is complex enough to warrant some simple documentation, along the lines seen here: https://github.com/igvteam/igv.js/wiki/Wig-Track. I don't know how to do a PR for the wiki, I think it has its own hidden repo, but if you write the documentation in the wiki on your own fork I will just copy/paste it. I would just document the junction track options as a stand-alone track, then maybe show how it can be merged with a wig track as an example. I am still away, working a bit today then traveling all day tomorrow. If you are ready to merge we can aim for final testing and merging by the end of the week. No rush, it will probably be another 2 weeks before the next igv.js release. I need to get an IGV desktop release out first. |
|
@jrobinso that sounds great. In the mean time I'll see if I can get some feedback from people here and then write the docs. |
|
@bw2 Ahh, maybe because I hadn't pushed it. Try now. |
|
Awesome. I can set track height. |
|
@bw2 -- could you modify your dev/example html, or create a new one, to create a stand-alone junctions track (not part of a merged track). We need to confirm that works as expected. Thanks. |
Fix render problems with standalone track
|
@bw2 To fix the stand-alone problem replace "computePixelHeight" in featureTrack.js with this. I've applied this to the PR by editing the file in place from the github web interface, I really don't know what that does to be honest. |
|
Apparently it committed it to my splice_junction_track branch. I just did git pull and can see the issue is fixed. |
|
@jrobinso I was trying to avoid When I look at |
|
If I just reload the page without changing anything, the error goes away, but occurs again relatively frequently. |
|
I'm now thinking it might be caused by React dev hot-reloading mode. |
|
That commit fixes the above issue with the artifacts. For the "Cannot read property 'tabix' of undefined" message, it also occurs when a user/auth token doesn't have permissions to access a particular file. |
|
@bw2 RE the tabix.index problem, if the user doesn't have permissions to load the index I can see how that might happen. However the fix would be to correctly detect this condition and give an appropriate message, not to check for index "nullness". Or perhaps I'm misunderstanding you. This comment thread is getting long, for any other problems could you open a git issue with a test case independent of this branch? Thanks. |
|
I agree, it would be great to show a "can't read file" error message. I'm not yet familiar enough with the IGV.js error handling approach, so thanks for catching that commit. I'll create a separate issue. |
…e_junction_track
…elIsAnnotatedJunction => labelAnnotatedJunction.
|
This is a docs page for this track (github didn't let me upload it as .md so I renamed to .txt). |
…lice_junction_track
change type 'junctions' -> 'spliceJunctions'
change type 'junctions' -> 'spliceJunctions'
|
Hi @bw2 this is now merged. I made 1 change, I changed the type string to "spliceJunctions". The "junctions" type is used in IGV desktop for yet another track, and it will be ported to igv.js eventually. I want to keep track type strings consistent between the 2. For now I have defined "junctions" to be asynonym for "spliceJunctions", so your current installations should work without change, but eventually "junctions" will come to mean the IGV desktop style track. |
|
@bw2 Also I corrupted your branch slightly trying to make edits through github before the merge, apologies for that, but you should start fresh from the igv.js master branch for future work. Could you pull when you get a chance and confirm that everything got merged correctly? |
|
@jrobinso , I did some testing on latest igv.js master and all track features still work as expected. The only issues I can see are
|
|
@bw2 ok I'll have a look. I'm covered up in some IGV desktop stuff now. |
|
@bw2 I can't reproduce the splice junction scroll problem. I'm using dev/spliceJunctions.html and exmples/spliceJunctionTrack.html. Feel free to modify those to trigger the problem. |
|
@jrobinso sorry, turned out the repaints were happening because my code had started calling |








Initial implementation of a scrollable genome-wide sashimi track which is actually a
type:'merged'track that combines 2 tracks: atype:'wig'track that renders the coverage islands, and a newly-implementedtype:'junctions'track which reads intervals from a .bed file and renders them as splice junctions.The .bigWig file for wig track can be created from a .bam file using a tool like bam2coverage
An indexed junctions .bed.gz file can be created from splice junction calls (such as those generated by the STAR aligner in the *.SJ.out.tab file) by selecting chrom, start, end, label, spanning-read-count, and strand columns into a .bed.gz file and then tabix'ing it:
Then, to create a single splice junction track in igv.js:
Known Issues:
Possible future features:
Screenshot