Learn R Programming

DEGraph (version 1.24.0)

getKEGGPathways: Builds a graph for each of the KEGG pathways

Description

Builds a graph for each of the KEGG pathways.

Usage

getKEGGPathways(path=NULL, rootPath="networkData/ftp.genome.jp/pub/kegg/xml/kgml", organism="hsa", metaTag=c("non-metabolic", "metabolic"), pattern=NULL, verbose=FALSE)

Arguments

path
A character value, the local _full_ path of KGML data.
rootPath
A character value, the local _root_ path of KGML data.
organism
A character value specifying the organism whose pathways should be considered. Defaults to "hsa" (Homo Sapiens).
metaTag
A character value, specifying the type of pathways to be considered ("metabolic" or "non-metabolic"). Defaults to "non-metabolic".
pattern
An optional character value specifying a file name pattern to look for.
verbose
If TRUE, extra information is output.

Value

A list containing a graph object for each KEGG pathway with at least one edge.

Details

If 'path' is supplied, KGML files in this directory are loaded. Otherwise, KGML files are assumed to be in //"organisms"/, which mirrors the structure of the KEGG KGML file repository.

See Also

parseKGML KEGGpathway2Graph

Examples

Run this code
library("Rgraphviz")
library("KEGGgraph")

## example of KGML files
path <- system.file("extdata", package="KEGGgraph")
grList <- getKEGGPathways(path=path, verbose=TRUE)
print(grList)

graph <- grList[[1]]
plotKEGGgraph(graph)

## Not run: 
#   ## Download all human KGML pathways locally
#   pathname <- system.file("downloadScripts", "downloadKeggXmlFiles.R", package="DEGraph")
#   source(pathname)
# 
#   ## Load some of them
#   grList <- getKEGGPathways(pattern="040", verbose=TRUE)
#   print(grList)
# 
#   graph <- grList[[1]]
#   plotKEGGgraph(graph)
# ## End(Not run)

Run the code above in your browser using DataLab