KEGGpathway2Graph: Parses KEGGpathway to graph

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/parse.R

Description

The function parses an object of KEGGPathway-class into graph.

Usage

1
KEGGpathway2Graph(pathway, genesOnly = TRUE, expandGenes = TRUE)

Arguments

pathway

An instance of KEGGPathway-class

genesOnly

logical, should only the genes are maintained and other types of nodes (compounds, etc) neglected? TRUE by default

expandGenes

logical, should homologue proteins expanded? TRUE by default

Details

When 'expandGenes=TRUE', the nodes have unique names of KEGGID (in the form of 'org:xxxx', for example 'hsa:1432'), otherwise an auto-increment index given by KEGG is used as node names. In the latter case, the node names are duplicated and graphs cannot be simply merged before the nodes are unique.

KEGG node and edge data is stored in 'nodeData' and 'edgeData' slots respectively, which can be extracted by getKEGGnodeData and getKEGGedgeData.

Value

A directed graph.

Author(s)

Jitao David Zhang mailto:jitao_david.zhang@roche.com

See Also

parseKGML2Graph

Examples

1
2
3
sfile <- system.file("extdata/hsa04010.xml",package="KEGGgraph")
kegg.pathway <- parseKGML(sfile)
gR.compact<- KEGGpathway2Graph(kegg.pathway,expandGenes=FALSE)

Example output

Attaching package: 'KEGGgraph'

The following object is masked from 'package:graphics':

    plot

KEGGgraph documentation built on Nov. 8, 2020, 5:42 p.m.