Open jogoodma opened 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.
For a live view, see the Transcript section of this gene report.
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
I am just posting that link as a reference, not that it has been tested in jbrowse codebase currently
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.
or as an imagemap to make features in the image clickable.
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