igvteam / igv-notebook

Module for embedding igv.js in an IPython notebook
MIT License
59 stars 13 forks source link

feature request for exporting the igv-browser visualization #8

Closed KalinNonchev closed 2 years ago

KalinNonchev commented 2 years ago

Hello IGV-notebook team,

Thanks for this great package! I have the following case: When I am doing analysis and I look at specific genomic coordinates, often I want to share the jupyter notebook as html directly with the collaborators. However, when I export the notebook as html file, the output of igv-notebook is missing. It would be nice and very useful to export the igv-browser visualization. Would it be possible to render the javascript to an image so that it is visible in the html file under the code cell?

Best,

jrobinso commented 2 years ago

I will look into this.

jrobinso commented 2 years ago

This is implemented for Jupyter Notebook only in version 0.3.0. A new function is added to "browser",

to_svg()

This function will convert the igv instance to a static SVG image. The "To SVG" button on the igv command bar does the same thing.

This will not work in JupyterLab or Colab environments, supporting this in those environments would be difficult, if even possible.