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"))A igraph graph.
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")