RCy3 2.27.0
This vignette will demonstrate network retrieval from the STRING database, basic analysis, TCGA data loading and visualization in Cytoscape from R using the RCy3 package.
if(!"RCy3" %in% installed.packages()){
install.packages("BiocManager")
BiocManager::install("RCy3")
}
library(RCy3)
if(!"RColorBrewer" %in% installed.packages()){
install.packages("RColorBrewer")
}
library(RColorBrewer)
The whole point of RCy3 is to connect with Cytoscape. You will need to install and launch Cytoscape:
cytoscapePing()
For this vignette, you’ll also need the STRING app to access the STRING database from within Cytoscape: * Install the STRING app from https://apps.cytoscape.org/apps/stringapp
#{r} #available in Cytoscape 3.7.0 and above installApp('STRINGapp') #
Use Cytoscape to query the STRING database for networks of genes associated with breast cancer and ovarian cancer.
If the STRING app is not installed, no error is reported, but your network will be empty
string.cmd = 'string disease query disease="breast cancer" cutoff=0.9 species="Homo sapiens" limit=150'
commandsRun(string.cmd)
Here we are using Cytoscape’s command line syntax, which can be used for any core or app automation function, and then making a GET request. Use commandsHelp to interrogate the functions and parameters available in your active Cytoscape session, including the apps you’ve installed!
string.cmd = 'string disease query disease="ovarian cancer" cutoff=0.9 species="Homo sapiens" limit=150'
commandsRun(string.cmd)
Now that we’ve got a couple networks into Cytoscape, let’s see what we can do with them from R…
getNetworkList()
layoutNetwork(layout.name='circular')