-
Notifications
You must be signed in to change notification settings - Fork 120
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
biojs2iPython #111
Comments
That would be great. I gave it a try a couple of month ago with the jHeatmap component: https://github.com/jheatmap/jheatmap-ipython |
@abstatic - that's nice to hear. Don't hesitate to go ahead, play with it and create a simple component.
Don't forget that there is BioPython and ideally we want to have visualizations for most of their formats ;-) |
@greenify thanks for prompt reply! I will get straight down to work and develop the notebooks and post them here for review. |
I'm following along here, too. :) I would also add that the widget approach is an obvious candidate, but has some serious limitations (such as not being able to be seen unless one has a live kernel). That would make BioJS widgets invisible via nbviewer. Note in this notebook that there are no widgets visible: |
That's cool guys - I once did a small study on the jHeatmap component: https://github.com/jheatmap/jheatmap-ipython Feel free to use it as a use-case - I guess it is a good scenario as people often work with data-frames that could be seen as heatmaps. Have fun |
Hi guys. I have been trying to follow as suggested by @greenify above. I wanted to ask you all what the best way to inject a javascript library (say biojs-io-fasta) is into a jupyter notebook. I have been using the %%html magic of jupyter notebook.
Then if I do something like
I get require js errors like context not loaded in the console. Jupyter itself uses requrejs to load javascript files. |
@zsameem try using it in conjunction with browserify ? It might help. |
Hi @zsameem
None of them is perfect and each has their gotchas. Browse the web how people integrate Have a look at declarative widgets they seem to be doing roughly what we want and they focus on web components (we want to get this done in biojs3) and already do a lot of stuff that we want too (e.g. data binding). I really liked what I saw on their online demo. |
Hi @greenify I went through the links. Tried following code to embed the biojs-io-fasta library.
When I check the console, the output is |
@zsameem Is it the exact code snippet you are using? |
Please follow the progress here: https://github.com/rohanjaswal2507/biojsIPython |
@rohanjaswal2507 Thank you for starting this effort! I think it's important and very useful. |
Based on `biojs2galaxy we could create a similar approach for IPython/Jupyter notebooks.
Infos about IPython
Widgets in iPython are described here and defined in IPEP23.
A widget just consists of one Backbone view which gets the model injected by the WidgetManager. So basically there is already a two-way communication lifecycle for a model.
(The JS Widget implements also the
save
function of a Backbone view and listens to updates).The Backend sends the Model JSON to the JavaScript WidgetMgr which then creates the view (a simple example).
I found also an example with D3.
(Two months ago I posted some thoughts about this to the BioJulia community.)
The text was updated successfully, but these errors were encountered: