subGraphByNodeType: Subset KEGG graph by node types

View source: R/graph.R

subGraphByNodeTypeR Documentation

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

Author(s)

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

Examples

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

Accio/KEGGgraph documentation built on Jan. 13, 2023, 1:03 p.m.