subGraphByNodeType {KEGGgraph} | R Documentation |
The function subsets KEGG graph by node types, mostly used in extracting gene networks.
subGraphByNodeType(graph, type = "gene", kegg=TRUE)
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' |
A subgraph of the original graph
Jitao David Zhang mailto:j.zhang@dkfz.de
sfile <- system.file("extdata/hsa04010.xml",package="KEGGgraph") sGraph <- parseKGML2Graph(sfile,expandGenes=TRUE, genesOnly=FALSE) sGraphGene <- subGraphByNodeType(sGraph, type="gene")