showing specific GO pathways in the dotplot or cnetplot
2
0
Entering edit mode
5.8 years ago
Vasu ▴ 790

This clusterprofiler tutorial is very helpful for visualizing the GO pathways and other pathways clusterprofiler. In the dotplot, emapplot or cnetplot there is only way to show top category pathways.

I'm interested to show some specific pathways which means I want to exclude some unimportant pathways among the top categories.

How to do that?

RNA-Seq R clusterprofiler dotplot goenrichment • 20k views
ADD COMMENT
16
Entering edit mode
5.8 years ago
Prakash ★ 2.2k

This has been discussed here. I have modified the code posted by Ming Tang you can plot selected pathway using ggplot2 from the enrichplot result

x <- enrichPathway(gene=de,pvalueCutoff=0.05, readable=T)
y <- as.data.frame(x)
head(y)
ggplot(y[c(1,4,5,7,8),], # you can replace the numbers to the row number of pathway of your interest
             aes(x = GeneRatio, y = Description)) + 
             geom_point(aes(size = GeneRatio, color = p.adjust)) +
             theme_bw(base_size = 14) +
             scale_colour_gradient(limits=c(0, 0.10), low="red") +
             ylab(NULL) +
             ggtitle("GO pathway enrichment")
ADD COMMENT
0
Entering edit mode

Excellent.. Thanks a lot for sharing the link and the answer.

ADD REPLY
0
Entering edit mode

Thanks, nice solution! Is there some way to convert the GeneRatio from character (e.g. 23/356) to the result of the formula? I tried with as.numeric(GeneRatio) and as.formula(GeneRatio) but it didn't work.

ADD REPLY
1
Entering edit mode

sapply(strsplit(y$GeneRatio, split = "/"), function(x) as.numeric(x[1]) / as.numeric(x[2]))

ADD REPLY
2
Entering edit mode
4.1 years ago
Guangchuang Yu ★ 2.6k

Sorry for late reply. This is actually supported, see https://yulab-smu.top/biomedical-knowledge-mining-book/faq.html#showing-specific-pathways.

ADD COMMENT

Login before adding your answer.

Traffic: 2363 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