Learn R Programming

GOSim (version 1.10.0)

getGOGraph: (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

Value

graphNEL object(s)

Details

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

Examples

Run this code
	
 	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
 	} 

Run the code above in your browser using DataLab