plotNW {GSCA}R Documentation

The function to draw a network from a correlation matrix

Description

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.

Usage

plotNW(genes = NULL, cormatrix, node.de = NULL, ncolor = "red", ecolor = NULL, ewidth = 1, gtype = "neato", ...)

Arguments

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.

Author(s)

YounJeong Choi

References

Choi and Kendziorski (2009)

See Also

plot.graph, Rgraphviz

Examples

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")

[Package GSCA version 1.1.0 Index]