genomeview icon indicating copy to clipboard operation
genomeview copied to clipboard

Suggestion: Update to run via MyBinder.org

Open fomightez opened this issue 5 years ago • 4 comments

See here for an example of it working. Click launch binder badge.
That could serve as a guide how do it, if you'd like.
Sorry, I didn't fork it because I didn't know if it would actually work since I had a heck of a time getting it to work in sessions launched using this repo. Used that one because I knew it had cython.

The last few cells (specifically ten onward) don't work because FTP is blocked. I may add the needed files at some point to make sure no other issues.

fomightez avatar Aug 01 '19 18:08 fomightez

Also, you could choose to do the classic notebook interface via https://mybinder.org/v2/gh/fomightez/genomeview-binder/master?filepath=examples%2Fexamples.ipyn . I went with JupyterLab for the last update because I was curious if it would work or not since some plotting things have issues in JupyterLab.

fomightez avatar Aug 01 '19 18:08 fomightez

Happy to accept pull requests on this. I couldn't get the link you shared to work, not sure if it's a mybinder problem or a setup issue ("Repository fomightez/genomeview-binder/master is taking longer than usual to start, hang tight!" for a long time...).

For what it's worth, the cythonized quickconsensus code is probably unnecessary with more recent versions of pysam. You can force it to load the pure python version by editing here. Might make it easier to install. Haven't had a chance to try this out myself yet.

nspies avatar Aug 04 '19 16:08 nspies

Oops. I had a typo at the end of the last link.
And the long delay when you tried was because I hadn't triggered building the launchable image for it again after the last update. (Sorry.) The first build after an update to the source repository is triggered when someone tries to launch a session, and it can a take a substantial amount of time (I'd estimate 10 minutes or more). You can see what it is doing during that time if you hit show on the 'Build logs' bar below the 'Hang tight' message.

Either of these now work and will launch an active session in a couple of minutes :

Classic notebook interface:
https://mybinder.org/v2/gh/fomightez/genomeview-binder/master?filepath=examples%2Fexamples.ipynb

JupyterLab: https://mybinder.org/v2/gh/fomightez/genomeview-binder/master?urlpath=lab/tree/examples%2Fexamples.ipynb

In regards, to the cython / pysam issue. Which approach do you prefer as the example direction? Or, perhaps a better way to consider it would be which approach will give users the most pleasant, yet realistic experience running the example page as a demo, and still set them up for maybe trying with their own data? It seems like right now you have it defaulting to using cython, and so I was trying to follow that. It isn't hard to include cython now that I have it worked out.

I still need to sort out adding the data for the last few cells, and so I'll be a bit before I fork it and make a PR. (Sorting out the data issue to step around the need for ftp when using MyBinder.org should be doable as I have done it for other repos I have binder-ized, such as circos-binder. That is if the file sizes aren't too outrageous. Worse case scenario is that I'll need to make toy data for those few cells and trigger pointing that out when running from the MyBinder served session.)

fomightez avatar Aug 05 '19 15:08 fomightez

This is great!

Since you've already gotten things working with cython, I'd say not to worry about it for this purpose. I'll open a separate issue to look into performance without it.

Making more toy data shouldn't be a problem, but I did want to highlight the fact that many of the underlying libraries allow streaming indexed data directly over the internet. Is there an easy way to host some of these files on http, which looks to be open to mybinder?

nspies avatar Aug 06 '19 01:08 nspies