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
460 stars 199 forks source link

Restore lost functionality of GBrowse_img #805

Open jogoodma opened 8 years ago

jogoodma commented 8 years ago

With the GBrowse_img component of GBrowse, we had the ability to export any region and track(s) to an external web page. The regions could be embedded as an image via a simple image tag

e.g.

<img src="http://localhost/cgi-bin/gb2/gbrowse_img/MG1655/?name=NC_000913:3923000..3951000"></img>

or as an imagemap to make features in the image clickable.

<iframe src="http://localhost/cgi-bin/gbrowse_img/elegans?name=B0001;embed=1" width="100%" height="250">
   <img src="http://localhost/cgi-bin/gbrowse_img/elegans?name=B0001"/>
</iframe>

At FlyBase, we use the second method extensively throughout the site. One difference being that we wrap the call to the gbrowse_img in another script that injects the result of the call into the HTML report page. This allows us to get around the use of iframes documented on the GBrowse_img wiki page. These images are used for report to report navigation so that users don't have to navigate through GBrowse. For example, when viewing the insertion P{EPg}CG42321[HP26676] you can use the image map to navigate to any of the neighboring insertions that you may be interested in.

Please note, we are not asking that imagemaps be used again, only that we have the ability to display any region from JBrowse in an external page and that image have configurable clickable regions.

These images and clickable image maps are currently used dozens of times in hundreds of thousands of reports and is a critical feature that we have to maintain. As such, we cannot fully replace GBrowse with JBrowse until this functionality is implemented.

Related issues: #772 , #575

jogoodma commented 8 years ago

Adding a gist from @cmdcolin for future reference. This example sets up data, JBrowse, and JBrowse config options to render an image in an external page, without pulling in JBrowse via an iframe.

An example of this approach can be seen in this screenshot. image

For a live view, see the Transcript section of this gene report.

cmdcolin commented 6 years ago

for actual rendering to image type thing, here's an example https://ourcodeworld.com/articles/read/38/how-to-capture-an-image-from-a-dom-element-with-javascript

cmdcolin commented 6 years ago

I am just posting that link as a reference, not that it has been tested in jbrowse codebase currently