The R markdown is available from the pulldown menu for Code
at the upper-right, choose “Download Rmd”, or download
the Rmd from GitHub.
Why use Jupyter Bridge
Users do not need to worry about dependencies and environment.
Easily share notebook-based workflows and data sets
Workflows can reside in the cloud, access cloud resources, and yet
still use Cytoscape features.
How Jupyter Bridge works
Jupyter-Bridge enables a workflow running on remote Jupyter to
execute functions on a PC-local Cytoscape – the remote Jupyter runs the
request through Jupyter-Bridge, where it is picked up by Javascript code
running on the Jupyter web page in the PC-local browser, which in turn
calls Cytoscape. The Cytoscape response travels the reverse route.
Jupyter-Bridge allows a remote Jupyter Notebook
to communicate with a workstation-based Cytoscape as if the Notebook
were running on the Cytoscape workstation. A Jupyter Notebook passes a
Cytoscape call to an independent Jupyter-Bridge server where it’s picked
up by the Jupyter-Bridge browser component and is passed to Cytoscape.
The Cytoscape response is returned via the opposite flow. As a result,
workflows can reside in the cloud, access cloud resources, and yet still
leverage Cytoscape features. Jupyter Bridge supports py4cytoscape
(Python library for communicating with Cytoscape) first, and now RCy3
also support Jupyter-Bridge.
There are a lot of cloud computing services online, such as Google
Colab, Amazon EMR Notebook, Microsoft Azure, CoCalc and your own
JupyterHub. You can choose your favorite one.
Here we use Google Colab to demonstrate. Visit this link to create a new empty R Notebook, and
make sure to run code below in the cloud.
Copy codes below to build connection between
Jupyter notebook (cloud) and Cytoscape (local).
Make sure to run code below in the
cloud!!!
Installation
Install the latest version of RCy3 from Bioconductor.
if (!requireNamespace("BiocManager", quietly =TRUE))install.packages("BiocManager")BiocManager::install("RCy3")library(RCy3)
Connect to local Cytoscape
First, build connection between the jupyter notebook and local
Cytoscape.
Then, launch Cytoscape and keep it running whenever using RCy3 and
Jupyter Bridge. Confirm that you have everything installed and
running:
cytoscapeVersionInfo()cytoscapePing()
Done! Now you can execute a workflow in a remote server-based Jupyter
Notebook to leverage your workstation’s Cytoscape. You can also easily
share notebook-based workflows and data sets.
Use case: Run differentially expressed genes network analysis in the
cloud