Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exporting a session to json #22

Closed
argschwind opened this issue Mar 8, 2023 · 8 comments
Closed

Exporting a session to json #22

argschwind opened this issue Mar 8, 2023 · 8 comments

Comments

@argschwind
Copy link

Hi,

We are using the IGV notebook implementation to explore our data interactively and easily create IGV sessions programmatically. To share generated IGV sessions with other team members, it would be great to be able to export them to json files. Is there the possibility to do that from within the colab framework?

Alternatively, a function creating a link to an igv.org web session that could then be share would be awesome as well. But that might be a bit more complicated.

Best,
Andreas

@jrobinso
Copy link
Contributor

jrobinso commented Mar 9, 2023

Hi, thanks for the interesting suggestions. I will investigate when I can find time, please leave the issue open.

Are the resources (tracks, reference fasta) loaded by URL ('url" properties) or by file path ("path" properties) in your notebooks? It will be difficult, if even possible, to use the sessions in igv.org/app if "path" is used.

@argschwind
Copy link
Author

Thanks for the quick reply. All tracks are loaded from publicly available URLs, e.g. the ENCODE portal.

@jrobinso
Copy link
Contributor

I've implemented these suggestions from the javascript (web) ui, see the new buttons above the IGV component. It would be much more difficult to implement either from python. You can try it by installing from github

pip install git+https://github.com/igvteam/igv-notebook

There's an example notebook here
https://colab.research.google.com/drive/1kr8_-JdMx1fed4lIe68bxmkhbXrKTXkr?usp=sharing

@jrobinso
Copy link
Contributor

jrobinso commented Mar 11, 2023

The session and igv web link buttons only work properly if you use URLs. The session created if "path" properties are used is currently not loadable.

BTW I had an "open in igv web" link which works, but I found it distracting to open igv-web even in another tab. Anyway that's also an option, rather than showing the link. One advantage to the link is you can right-click and copy it.

@argschwind
Copy link
Author

Thank you so much for the rapid implementation! This is exactly what we need and seems to work great.

@argschwind
Copy link
Author

Hi,

I noticed that this feature seems to have disappeared in the current version when installing via !pip install git+https://github.com/igvteam/igv-notebook. Is there any way to get this back @jrobinso?

@jrobinso
Copy link
Contributor

Yep, this is an unintended side-effect of inserting igv.js into a shadow dom. Apparently a shadow dom element cannot have a sibling (the extra button panel).

I'll have a fix for this soon.

@jrobinso jrobinso reopened this Oct 22, 2024
@jrobinso
Copy link
Contributor

The fix is released in versino 0.6.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants