inducedGraph: The subgraph induced by a set of nodes.

Description Usage Arguments Value Author(s) See Also Examples

View source: R/topGOgraph.R

Description

Given a set of nodes (GO terms) this function is returning the subgraph containing these nodes and their ancestors.

Usage

1
2
inducedGraph(dag, startNodes)
nodesInInducedGraph(dag, startNodes)

Arguments

dag

An object of class graphNEL containing a directed graph.

startNodes

A character vector giving the starting nodes.

Value

An object of class graphNEL-class is returned.

Author(s)

Adrian Alexa

See Also

topGOdata-class, reverseArch,

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
data(GOdata)

## the GO graph
g <- graph(GOdata)
g

## select 10 random nodes
sn <- sample(nodes(g), 10)


## the subgraph induced by these nodes
sg <- inducedGraph(g, sn)
sg

ycl6/topGO-feat documentation built on Aug. 12, 2020, 12:55 a.m.