g2nb / igv-jupyter

Extension for Jupyter which integrates igv.js
MIT License
154 stars 14 forks source link

Running a demo on MyBinder #20

Closed psychemedia closed 4 years ago

psychemedia commented 5 years ago

I was wondering if it would be possible to run the igv.js-jupyter demo notebooks on MyBinder?

Presumably an IGV server would need to be started in the container first? (I'm new to IGV...)

jrobinso commented 5 years ago

I'm not familiar with MyBinder but igv.js is a pure client program, there is no server. Its embedded in many things, that's what its designed for.

psychemedia commented 5 years ago

MyBinder builds and launches a Docker container based on the contents of a Github repo and particular config files specified within it (docs), so you can provide runnable demos of a repo. The build process is sensitive to the presence of setup.py files and will also build / install those.

You can run this repo (and even launch into a particular notebook) here: Binder

One thing I noticed running the demo is that it throws an error in the browser console when I try to to .show() a resource, and nothing is displayed hence my question. Are there additional packages required to run the demo?

jrobinso commented 5 years ago

Yes, I see an issue, not sure what it is. I'll look into it.

On Fri, Jan 18, 2019 at 11:55 AM Tony Hirst notifications@github.com wrote:

MyBinder builds and launches a Docker container based on the contents of a Github repo and particular config files specified within it (docs https://repo2docker.readthedocs.io/en/latest/config_files.html#config-files), so you can provide runnable demos of a repo. The build process is sensitive to the presence of setup.py files and will also build / install those.

You can run this repo (and even launch into a particular notebook) here: [image: Binder] https://mybinder.org/v2/gh/igvteam/igv.js-jupyter/master?filepath=examples%2FEmbeddedFeatures.ipynb

One thing I noticed running the demo is that it throws an error in the browser console when I try to to .show() a resource, and nothing is displayed hence my question. Are there additional packages required to run the demo?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/igvteam/igv.js-jupyter/issues/20#issuecomment-455668444, or mute the thread https://github.com/notifications/unsubscribe-auth/AA49HM_Xq_uAROTWbJTGr898FkG4UuJHks5vEiasgaJpZM4aHnJ3 .

jrobinso commented 5 years ago

@psychemedia I think you have to enable the igv extension, pip install is not enough. Sorry I'm a python nube and jupyter utra nube. Try this after installing and before starting jupyter notebook jupyter nbextension install igv jupyter nbextension enable igv

psychemedia commented 5 years ago

Ah, yes, that could be it.

Many extensions I use are auto-installed/enabled (howto) and I've got out of the habit of checking that step.

jrobinso commented 5 years ago

@psychemedia Thanks for that tip, I wasn't aware of that. I build it into the next release.

jrobinso commented 5 years ago

@psychemedia BTW, do you know what the "--py" flag does in those install instructions? I can't find that documented anywhere. --sys-prefix and --user are, but is "--py" neccessary and what does it do?

psychemedia commented 5 years ago

Hmm... good question... It looks to be undocumented, other than via docstrings, doesn't it? Looking at the code, it seems that:

 # enable all server extensions in a Python package
jupyter serverextension enable --py <packagename>  

# disable all server extensions in a Python package
jupyter serverextension disable --py <packagename> 
jrobinso commented 4 years ago

auto-enabling should be happening now.