dotplot for enrichment result

June 22, 2015

(This article was first published on YGC » R, and kindly contributed to R-bloggers)

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
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
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. offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...

If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.


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)