plotGOTermGraph connects all subtrees to the root node
0
0
Entering edit mode
RuBBiT0 ▴ 10
@7fec931f
Last seen 14 months ago
United States

When I used plotGOTermGraph function to make the GO graph, I notice some of the subtrees are not connected to the root node (e.g. GO:0008150 biological process). I wonder if there is a way to connect these subtrees to the root node manually. Or could you recommend any other packages/functions to plot the diagram? Thank you!

I made a small demo below:

entrezUniverse_example <- c("6181", "2915", "8846", "55818", "63946")
selectedEntrez_example <- c("6181", "55818", "63946")

# hypergeometric test
hgCutoff <- 0.001
params_example <- new("GOHyperGParams",
                geneIds=selectedEntrez_example,
                universeGeneIds=entrezUniverse_example,
                annotation="org.Hs.eg.db",
                ontology="BP",
                pvalueCutoff=hgCutoff,
                conditional=FALSE,
                testDirection="over")
# perform the test
hgOver_example <- hyperGTest(params_example)
# plot
graph_example <- inducedTermGraph(hgOver_example, id = c(summary(hgOver_example, pvalue = 1)$GOBPID),
                              children = F, parents = T)


plotGOTermGraph(graph_example, r = hgOver_example, 
                add.counts = T, max.nchar = 200,
                node.colors = c(sig="darkorange", not="deepskyblue1"),
                node.shape = "ellipse")

full tree

With pvalue = 1, I can plot the full tree and all nodes will be connected to the root node eventually, but this has too many nodes.

graph_example <- inducedTermGraph(hgOver_example, id = c(summary(hgOver_example, pvalue = 0.4)$GOBPID),
                              children = F, parents = T)

With pvalue = 0.4, I have a subset of nodes but some subtrees are not connected to the root node.

enter image description here

GO.db GOstats • 583 views
ADD COMMENT

Login before adding your answer.

Traffic: 615 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6