Cytoscape is a popular tool for network analysis. It has been in developed for over 20 years and now has a robust ecosystem with many plugins/apps to for specific uses. Their is a detail user manual (which can be edited on github) and tutorials.
Within R there are several alternative graph visualization packages including igraph and the Bioconductor package graph. Both are excellent packages however this past year a new R interface to Cytocape Rcy3 was released which we will explore today. Here is the initial publication describing Rcy3
.
Basic Data Visualization
and Differentially Expressed Genes
Overview of RCy3
Check to make sure it can connect to Cytoscape
library(RCy3)
cytoscapePing()
## You are connected to Cytoscape!
Note that the code for the first graph will run in the R console, but not in Rmd (I am not sure why at the moment). All other code chunks knit fine, but the images appear in Cytoscape.
c("node 0","node 1","node 2","node 3"),
group=c("A","A","B","B"), # categorical strings
score=as.integer(c(20,10,15,5)), # integers
stringsAsFactors=FALSE)
edges <- data.frame(source=c("node 0","node 0","node 0","node 2"),
target=c("node 1","node 2","node 3","node 3"),
interaction=c("inhibits","interacts","activates","interacts"), # optional
weight=c(5.1,3.0,5.2,9.9), # numeric
stringsAsFactors=FALSE)
createNetworkFromDataFrames(nodes,edges, title="my first network", collection="DataFrame Example")
The network will not appear in R, but in Cytoscape
Create a .Rmd that shows your final graphs from the Cytoscape and RCy3 exercises. Link to your main course page.