plotNW {GSCA} | R Documentation |
This function is a custom wrapper of plot.graph
implemented in
Rgraphviz
. It draws a network from a given correlation matrix. Nodes
can be colored by DE information, and edges can be colored based on
the correlation magnitude and direction.
plotNW(genes = NULL, cormatrix, node.de = NULL, ncolor = "red", ecolor = NULL, ewidth = 1, gtype = "neato", ...)
genes |
Node names to be displayed in the network plot. If
NULL (default), rownames(cormatrix) is used. |
cormatrix |
A symmetric correlation matrix to draw a network from. |
node.de |
A vector of 0's and 1's. The "1" nodes are colored in
ncolor . |
ncolor |
Node color for selected genes specified by node.de . |
ecolor |
Edge color palette. The default is bluered(201)
implemented by gplots , which sets c("blue", "white", "red")
for the correlation of c(-1, 0, 1). |
ewidth |
Edge width. Default is set to 1. |
gtype |
Graph type (layout ) to be passed to
plot.graph . One of dot , neato , twopi ,
circo , and fdp . The default is neato . |
... |
The rest of arguments are passed to plot.graph . |
YounJeong Choi
Choi and Kendziorski (2009)
data(LungCancer3) GS <- LungCancer3$info$GSdef GSdesc <- LungCancer3$info$Name setid <- "GO:0019216" gid <- GS[[setid]] ss <- c("SERPINA3", "SOD1", "SCAP", "NPC2", "ADIPOQ", "PRKAA1", "AGT", "PPARA", "BMP6", "BRCA1") plotNW(genes = ss, cormatrix = cor(t(LungCancer3$data$Michigan[gid, 87:96]), use = "pairwise.complete.obs"), node.de = c(rep(1, 5), rep(0, 5)), ncolor = "yellow", ecolor = bluered(201), ewidth = 5, gtype = "circo")