dotplot for enrichment result

[This article was first published on YGC » R, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

This is a feature request from clusterProfiler user. It’s similar to what I implemented in clusterProfiler for comparing biological themes. For comparing different enrichment results, the x-axis represent different gene clusters while for a single enrichment result, the x-axis can be gene count or gene ratio. This is actually similar to traditional barplot, with dot position as bar height and dot color as bar color. But dotplot can represent one more feature nicely by dot size and it can be a good alternative to barplot.

?View Code RSPLUS
1
2
3
4
library(DOSE)
deg = names(geneList)[abs(geneList) > 1]
do = enrichDO(deg)
dotplot(do, showCategory=20)


We can set the x-axis to use gene count and dot color by one of ‘pvalue’, ‘p.adjust’ or ‘qvalue’.

?View Code RSPLUS
1
dotplot(do, x="count", showCategory=20, colorBy="qvalue")

The dotplot function is also available in clusterProfiler and ReactomePA.

Related Posts

To leave a comment for the author, please follow the link and comment on their blog: YGC » R.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)