getGOGraph {GOSim} | R Documentation

## (1) Get GO graph with specified GO terms at its leave; (2) Get GO Graph with GO terms at leaves associated to one or several genes of interest.

### Description

The function getGOGraph returns a graphNEL object representing the GO graph with leaves specified in the argument. The function getGOGraphsGenes returns a set of graphNEL objects. The ith graph object is created by call to getGOGraph with the GO terms associated to gene i. It hence shows for each gene, where its GO terms are located within the GO structure.

### Usage

    getGOGraph(term, prune=Inf)

    getGOGraphsGenes(genelist, prune=Inf)

### Arguments

`term` | character vector of GO terms
`genelist` | character vector of Entrez gene IDs
`prune` | do not show the complete graph, but prune it after the specified number of ancestors

### Details

The result is computed within the currently set ontology ("BP","MF","CC").

### Value

graphNEL object(s)

### Note

directly calls the function `GOGraph` in the "GOstats" library

### Author(s)

Holger Froehlich

### Examples

     	G=getGOGraph(c("GO:0006955","GO:0007584"))
     	if(require(igraph)){
     		g=igraph.from.graphNEL(G)
     		plot(g, vertex.label=V(g)$name)
     		Gs = getGOGraphsGenes(c("207","7494"))
     		g = igraph.from.graphNEL(Gs[[1]])
     		plot(g, vertex.label=V(g)$name) # plot the first of both GO graphs
     	}

[Package GOSim version 1.26.0 Index]