Flip nodes and layout treeplot (enrichplot)
Dear all,
I have been trying to visualise my GSEA results using the treeplot function. I have two questions:
- I was wondering whether it is possible to extract the similarity matrix and the word clouds on which the clustering is based, to better explain the results?
- I would like to flip two nodes of the treeplot. Using the ggtree function, I have been able to flip nodes, but the layout of the original clustering stays in place. Is there a way to also flip the layout?
This is the code I used to try and flip the nodes:
library(enrichplot)
library(GOSemSim)
d <- godata('org.Ss.eg.db', ont="BP")
edox3 <- pairwise_termsim(gse_reac, method = "JC", semData = d, showCategory = 200)
p <- treeplot(edox3, offset = 2, label_format = 15, fontsize = 4, showCategory = 25, nWords = 3)
p + geom_text(aes(label=node))
p1 <- flip(p, 27,28)
p1
These are the before (top) and after (bottom) the flip, where you can see that the nodes are switched but the layout otherwise stays in place:
Thanks a lot for the help in advance!
Cheers, Anna
• 734 views
•
link
0 answers
No answers yet.
Log in to answer this question.