jbrowse icon indicating copy to clipboard operation
jbrowse copied to clipboard

Step to previous/next visible feature in track

Open keiranmraine opened this issue 10 years ago • 20 comments

Hi,

Would it be possible to add the ability to step to the previous/next variant in a VCF track? This follows on from the 'show PASS' ticket I submitted last week in that it should work based on the currently selected filter. This would make it very easy for a scientist to quickly step through variants that they are interested in.

I'd expect that they would still need to select the chromosome initially though. Ideally the buttons would be visible next to the track name rather than in the context menu.

Is this something that is possible in the current framework? I have a final add-on request that would turn JBrowse into a great tool for variant inspection which I'll add now.

Keiran

keiranmraine avatar Sep 23 '13 08:09 keiranmraine

This is applicable to more than just variants; changing issue title to reflect that.

rbuels avatar Sep 23 '13 13:09 rbuels

Yes, for any effective list of 'things with sequence locations' we'll want navigational features to step through them forwards, backwards, and directly to a single entry.

And then there so many different possible 'locatiable thing lists' that we'll want to support construction of.

On Sep 23, 2013, at 6:20 AM, Robert Buels [email protected] wrote:

This is applicable to more than just variants; changing issue title to reflect that.

— Reply to this email directly or view it on GitHub.

selewis avatar Sep 23 '13 17:09 selewis

Well, there is going to be support for elided/discontinuous views (see #208). If the view is set to only show regions with the features of interest, that's probably better than some kind of next/previous buttons, I think. Thoughts?

rbuels avatar Nov 22 '13 13:11 rbuels

I think we'll need both.

Elision is useful for connecting genes fragmented across multiple scaffolds, bring all exons of a gene into the same visual field when the introns are long, putting paralogs side-by-side, etc.

Navigation is useful, as examples, if an upstream piece of software has identified likely annotation errors that need to be checked one by one. Or perhaps to look at the genes for a particular pathway, with a certain function, expressed in a certain tissue, etc. I could see people people navigating one-by-one to areas from a list and then selecting areas that want to choose for an elided view as above after viewing them.

-S

On Nov 22, 2013, at 5:52 AM, Robert Buels [email protected] wrote:

Well, there is going to be support for elided/discontinuous views (see #208). If the view is set to only show regions with the features of interest, that's probably better than some kind of next/previous buttons, I think. Thoughts?

— Reply to this email directly or view it on GitHub.

selewis avatar Nov 22 '13 17:11 selewis

I am currently faced with exactly the Use Case suggested... I am loading blast hits as gff and want to navigate through them and contrast them to (Maker based) gene models.

malcook avatar Aug 02 '16 19:08 malcook

Apollo has the ability to do jump to next/prev feature for the special "User-created annotations" track, but it is a special case because the "User-created annotations" track downloads the entire gene set at once.

In contrast, most tracks are "block based" (i.e. only downloads the data for the region being viewed). Scanning for the next available feature could be done in different ways depending on how you want to approach it (if it's relatively sparse, could just download entire thing. if theres a lot of data might want to scan block by block)

you could make a custom right-click function to do it http://gmod.org/wiki/JBrowse_Configuration_Guide#Customizing_Right-click_Context_Menus if you wanted to experiment

cmdcolin avatar Aug 12 '16 15:08 cmdcolin

Alternative is for the user to load a BED file into the local browser (so all coordinates are available) and have it pop up as a prev/next toolbar button. This is in IGV as region of interest. We've worked around this in the past by embedding JBrowse in a webpage that handles this and then controls the frame but it's clunky and eats screen space.

I may play with the context menus if I get a chance.

keiranmraine avatar Aug 16 '16 10:08 keiranmraine

Thanks for explaining some of the technical challenges of implementing this.

FWIW, (ignoring the relative difficulties of alternate implementations), IMO, the ability of the user to scan rapidly through many features, in sequential order, will be absent if a next/previous feature capability is not bound to a keystroke. From a user interface perspective, I would vote against putting this capability in a right-click context-menu.

malcook avatar Aug 16 '16 14:08 malcook

@malcook, yes, our wrapping method bound the controls to keystrokes.

keiranmraine avatar Aug 16 '16 14:08 keiranmraine

Aha - understood & good news - and, I now do hope you get that chance to play with the context menus.

BTW - another approach to my Use Case of reviewing blast results is to re-format them with hyperlinks targeting Apollo/JBrowse. Do you happen to know if there is a GMOD "reference implementation" of such....?

malcook avatar Aug 16 '16 14:08 malcook

There are several ways to create links to jbrowse regions or features: http://gmod.org/wiki/JBrowse_Configuration_Guide#loc

You can link to regions of the browser using a format like this http://host/jbrowse/index.html?loc=chr1:100..2000

Alternatively you can link directly to features if you have run generate-names.pl e.g. http://host/jbrowse/index.html?loc=GENEID

cmdcolin avatar Aug 16 '16 16:08 cmdcolin

@cmdcolin - I've used such linking to fine success already, thanks. I was perhaps not clear. I wonder if someone has configured a tripal site with embedded blast against hosted genomes/transcriptomes that perhaps reports hits that link back to jbrowse (possibly using http://gmod.org/wiki/BLAST_Graphic_Viewer ), where the same blast HSP results would be embedded as a track.

Clearer? (despite being off topic to the original issue)

Hope springs eternal!

malcook avatar Aug 18 '16 17:08 malcook

@malcook The National Agricultural Library has something like this:

https://i5k.nal.usda.gov/webapp/blast/

They use Tripal downstream somewhere, but I don't think they embed it.

You might want to try the Tripal mailing list as well:

https://lists.sourceforge.net/lists/listinfo/gmod-tripal

The NAL solution (a django app) is open-source and I can provide the links if need be. It uses existing JBrowse functionality only.

There is also a BLAST solution being developed by @enuggetry for JBrowse directly, but I'm not sure when that will be ready (should be this year though).

nathandunn avatar Aug 18 '16 17:08 nathandunn

Nathan!

Excellent example! Just the sort of integration I was thinking might exist in the wild already. Thanks. I’m looping in Sofia Robb, our GMOD/Tripal site developer, in case she wants to follow up on either.

~Malcolm

malcook avatar Aug 18 '16 18:08 malcook

Would anybody be able to do a little sketch of how this might look in the UI? Or post a screenshot of a product that is already doing it nicely, that we could emulate?

rbuels avatar Jan 30 '18 22:01 rbuels

Track based next/previous

Would it make sense to take over the <--/--> in the nav-bar via a track menu option? The track title and nav-bar <--/--> could highlight in same color to indicate they are linked.

If using a VCF track the movement would need to honour the currently selected filters.

Plus points:

  • Simple for users as no need to construct files and upload.
  • Uploading custom BED file and using that emulates ROI behaviour of IGV.

Potential issues:

  • Multiple requests to server for data by index locations to find next variant that matches the set filters. May need some form of indicator that multiple reqs are made to show something is happening
  • Can only use with a single track at a time (I guess you could link many in but that would get messy and confusing for basic users)
    • BUT - power-users could upload a ROI bed file as a track which has locations relevant to many tracks.
    • possible that this could be a special track type that isn't displayed or is plotted within the nav-bar areas?

keiranmraine avatar Jan 31 '18 12:01 keiranmraine

@rbuels We do this in Apollo already for regular features, so I think it would be pretty easy to extend it. In the Apollo help from:

http://demo.genomearchitect.org/Apollo2/annotator/index ([email protected]/demo)

screen shot 2018-01-31 at 10 21 19 am

This was implemented on the track level using existing JBrowse functionality:

https://github.com/GMOD/Apollo/blob/master/client/apollo/js/View/Track/AnnotTrack.js#L154

I would move it to all tracks with discrete data by default and allow it to be configured off. I think there may already be an issue for this. Not sure if this overlaps / conflicts with what @keiranmraine was referring to.

nathandunn avatar Jan 31 '18 18:01 nathandunn

This feature was brought up again by @malcook yesterday as a way of quickly trying to flip through regions of interest

cmdcolin avatar Feb 14 '20 22:02 cmdcolin

@keiranmraine - IGV supports forward/backward by feature in "the current track" (chosen and highlighted on LHS panel) - only one track at a time - it meets all my use cases ever. Bound to Control-F/B. Warns if no current track. I only wish there was in addition:

  • visual indicator of current feature (maybe a light grey drop-shadow on it, or a yellow thin box around it)
  • keyboard shortcuts to
    • center the current feature
    • zoom out/in to current feature (+/- some flanking value as global preference, expressed as a whole number for nucleotide count (e.g. 150 means extra 75 bp on either side) or real number for percent of current feature size (e.g. 1.10 means 5% flanking on either side). Default=1 - zoom to feature exactly).

wink wink

malcook avatar Feb 15 '20 00:02 malcook

@malcook I'm aware that IVG supports these features, however JBrowse is much easier for the casual user of a genome browser as the users don't need to set anything up, install software or use slow X-forwarded graphical interfaces.

keiranmraine avatar Feb 15 '20 12:02 keiranmraine