subGraphByNodeType: Subset KEGG graph by node types

Description Usage Arguments Value Author(s) Examples

View source: R/graph.R

Description

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

Usage

1
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

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

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.