Learn R Programming

KEGGgraph (version 1.30.0)

subGraphByNodeType: Subset KEGG graph by node types

Description

The function subsets KEGG graph by node types, mostly used in extracting gene networks.

Usage

subGraphByNodeType(graph, type = "gene", kegg=TRUE)

Arguments

graph
A KEGG graph object produced by calling parseKGML2Graph
type
node type, see KEGGNodeType for details
kegg
logical, should the KEGG Node and Edge attributes be maintained during the subsetting? By default set to 'TRUE'

Value

A subgraph of the original graph

Examples

Run this code
sfile <- system.file("extdata/hsa04010.xml",package="KEGGgraph")
sGraph <- parseKGML2Graph(sfile,expandGenes=TRUE, genesOnly=FALSE)
sGraphGene <- subGraphByNodeType(sGraph, type="gene")

Run the code above in your browser using DataLab