Learn R Programming

SubpathwayGMir (version 1.0)

plotGraph: Visualize a pathway graph

Description

Visualize a pathway graph.

Usage

plotGraph(graph,margin=0,vertex.label.cex=0.6,vertex.label.font=1, vertex.size=8,vertex.size2=6,edge.arrow.size=0.2, edge.arrow.width=3,vertex.label=V(graph)$graphics_name, vertex.shape=V(graph)$graphics_type,layout=getLayout(graph), vertex.label.color="black",vertex.color=V(graph)$graphics_bgcolor, vertex.frame.color="dimgray",edge.color="dimgray", edge.label=getEdgeLabel(graph),edge.label.cex=0.6, edge.label.color="dimgray",edge.lty=getEdgeLty(graph), axes=FALSE,xlab="",ylab="",sub=NULL,main=NULL,...)

Arguments

graph
The igraph object of a pathway graph.
margin
A numeric. The value is usually between -0.5 and 0.5, which is able to zoom in or out a pathway graph. The default is 0.
vertex.label.cex
A numeric vector of node label size.
vertex.label.font
A numeric vector of label font.
vertex.size
A numeric vector of Node size. See plot.igraph
vertex.size2
A numeric vector of Node size.
edge.arrow.size
Edge arrow size.The default is 0.2.
edge.arrow.width
Edge arrow width. The default is 3.
vertex.label
A vector of node label. The default is graphics_name.
vertex.shape
A vector of node shape. The default is graphics_type.
layout
A matrix of x-y coordinates with two dims. Determine the placement of the nodes for drawing a graph. The default is the KEGG node coordinates that are originally obtained from the KGML file.
vertex.label.color
A vector of node label colors. The default is black.
vertex.color
A vector of node colors. The default is the KEGG node color.
vertex.frame.color
A vector of node frame color. The default is dimgray.
edge.color
A vector of edge color. The default is dimgray.
edge.label
A vector of edge label.
edge.label.cex
Edge label size.
edge.label.color
A vector of edge label color. The default is dimgray.
edge.lty
A vector of line type for the edges.
axes
A logical. whether to plot axes. The default is FALSE.
xlab
A character string. The label of the horizontal axis. The default is the empty string.
ylab
A character string. The label of the vertical axis. The default is the empty string.
sub
A character string of subtitle.
main
A character string of main title.
...
The arguments passed to or from methods. See plot.

Details

The function plotGraph is able to display a pathway graph.

The argument layout is used to determine the placement of the nodes for drawing a graph. There are mainly two preprocessed methods to determine the placement of the nodes for drawing a pathway graph: the KEGG pathway layout and layout provided in the function plot.igraph of the igraph package. The default layout is the KEGG layout, for which the coordinates of nodes in KEGG is used to determine the placement of the nodes for drawing a graph. Therefore, the returned figure by the function may be very similar to the KEGG pathway graph when information in the pathway graph is complete relatively. The layouts provided in igraph include layout.reingold.tilford, layout.random, layout.circle, layout.sphere,..., .

See Also

plot, layout.random

Examples

Run this code
## Not run: 
# ###  get  metabolic pathway graphs   ###
# 
# g<- GetK2riData(K2riData="MetabolicGEGEEMGraph")
# 
# # visualize the graph 
# plotGraph(g[[1]],layout=layout.random)
# 
# ## End(Not run)

Run the code above in your browser using DataLab