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

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 • 8.4k views
ADD COMMENT
12
Entering edit mode
2.7 years ago
Prakash ★ 2.1k

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
0
Entering edit mode

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

ADD REPLY
1
Entering edit mode
11 months ago
Guangchuang Yu ★ 2.5k

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: 1797 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