
Last chance! 50% off unlimited learning
Sale ends in
Plot graph for the pathway network
plotGraph(x, node.name = NULL, node.type = NULL, draw = TRUE,
tool = c("igraph", "Rgraphviz"), graph.node.max.size = 20,
graph.node.min.size = 3, graph.layout.method = NULL)
A igraph
object of the pathway
a cepa
object
node.name for each node
node.type for each node
Whether to draw the graph
Use which tool to visualize the graph. Choices are 'igraph' and 'Rgraphviz'
max size of the node in the graph
min size of the node in the graph
function of the layout method. For the list of available methods, see layout
Zuguang Gu <z.gu@dkfz.de>
Graph view of the pathway where the size of node is proportional to centrality value of the node.
By default, the layout for the pathway tree-like. If the number of pathway nodes is large, the layout would be a random layout.
Two packages can be selected to visualize the graph: igraph
and Rgraphviz
.
Default package is igraph
(in fact, this package just uses the data generated from
the layout function in igraph
package, which are the coordinate of nodes and edges.
And the I re-wrote the plotting function to generate the graph). From my personal view,
Rgraphviz
package generated more beautiful graphs.
If the tool
is set as igraph
, the function returns a igraph
object. And
if the tool
is set as Rgraphviz
, the function returns a graphAM
class object.
So if users don't satisfy, they can draw graphs of the network with their
own settings.
The function is always called through plot.cepa.all
and plot.cepa
.
if (FALSE) {
data(PID.db)
# ORA extension
data(gene.list)
# will spend about 20 min
res.ora = cepa.all(dif = gene.list$dif, bk = gene.list$bk, pc = PID.db$NCI)
ora = get.cepa(res.ora, id = 5, cen = 3)
plotGraph(ora)
# GSA extension
# P53_symbol.gct and P53_cls can be downloaded from
# http://mcube.nju.edu.cn/jwang/lab/soft/cepa/
eset = read.gct("P53_symbol.gct")
label = read.cls("P53.cls", treatment="MUT", control="WT")
# will spend about 45 min
res.gsa = cepa.all(mat = eset, label = label, pc = PID.db$NCI)
gsa = get.cepa(res.gsa, id = 5, cen = 3)
plotGraph(gsa)
}
Run the code above in your browser using DataLab