GMOD / jbrowse

JBrowse 1, a full-featured genome browser built with JavaScript and HTML5. For JBrowse 2, see https://github.com/GMOD/jbrowse-components.
http://jbrowse.org
Other
464 stars 199 forks source link

Make it easier to add external links in JBrowse #1247

Closed benwbooth closed 6 years ago

benwbooth commented 6 years ago

We are currently using JBrowse and Dalliance together, since JBrowse has the nice faceted track selection and incremental search, but Dalliance has SVG and PNG export capabilities. It would be nice if it were easier to add menu items in JBrowse that would point to an external page using a template, such as "https://my.page.org/dalliance/?loc={chr}:{start}-{end}&tracks={tracks}". Currently it looks like I will have to write a JBrowse plugin to get this functionality. But I think it would be useful if this were supported as a configuration option within JBrowse to make it easier for users to have this capability.

cmdcolin commented 6 years ago

It has currently been the case that plugins are sort of the "way to go" if modifying menus like the top menubar. It isn't really available via configuration. In that case this might overlap with #615

cmdcolin commented 6 years ago

If you want to see client-side jbrowse screenshot check out http://www.plantseq.org/browse ... this was done custom by the plantseq team using html2canvas https://html2canvas.hertzen.com/

benwbooth commented 6 years ago

Cool, but SVG format would be more suitable for producing publication-quality figures. Right now I am using Dalliance browser for this purpose.

cmdcolin commented 6 years ago

Good to know :) we will certainly keep high quality/svg on the roadmap for jbrowse itself

cmdcolin commented 6 years ago

If it's alright, I might close for now. If you want to endeavor to make a plugin, you can check out http://jbrowse.org/docs/faq.html#how-do-i-customize-the-main-menu-bar

The list of visible tracks would be

JBrowse.view.visibleTracks()

And the chr, start, end can be obtained by

JBrowse.view.visibleRegion()

The global object "JBrowse" can also be referred to by the "browser" that the plugin receives