By a given GO enrichment results, extract GO ancestor and offspring info from GO.db and then generate a simplified tree like graph.

getGraph(df, org, termID = "ID", onto = c("BP", "CC", "MF"))

Arguments

df

A data frame with enriched GO terms

org

An Go3AnnDbBimap object eg org.Dr.egGO2ALLEGS

termID

Column name in df which store the GO IDs

onto

The ontology category of the GO IDs

Value

A igraph graph.

Examples

library(org.Dr.eg.db)
goids <- c("GO:0099536", "GO:0099537", "GO:0007268", "GO:0098916", "GO:0050804")
g <- getGraph(data.frame(ID = goids), org = org.Dr.eg.db, onto = "BP")