How to create a dotplot like this for GSEA analysis from DNA methylation data (ChAMP.GSEA) in R?
2
0
Entering edit mode
15 months ago

enter image description here

I've tried with DOSE package and others, but they don't support this type of data

methylation GSEA • 4.7k views
ADD COMMENT
0
Entering edit mode

This seems like a simple ggplot with a 4 variable (GeneRatio, p.adjust, Count and something like "disease") data.frame. Are you having difficulties collecting the data or creating the plot?

ADD REPLY
0
Entering edit mode

create the plot. I have the OR and adjPvalue for each TOP10 Gene Pathways. I can't find any tutorial for this plot type specificaly.

ADD REPLY
0
Entering edit mode

You don't need a tutorial. Google is your friend. ggplot is all about adding layers to your plot, so start with a simple dot plot and change one thing at a time until you get to what you want.

ADD REPLY
1
Entering edit mode
15 months ago
Papyrus ★ 2.9k

Check out the R graph gallery, a nice resource for various plot types, in your case you're looking for "bubble" plots. But very simply for your data you could do:

library(ggplot2)

df <- data.frame(
  paths = paste0("path",1:3),
  ratio = runif(3),
  count = rnorm(3,200,50),
  p.adjust = runif(3)
)

ggplot(df, aes(x = ratio, y = paths, color = p.adjust, size = count)) + 
  geom_point(stat = 'identity') + 
  xlab("ratio") + ylab("path") + ggtitle("your data") + 
  theme_bw()
ADD COMMENT
0
Entering edit mode

Thank you! I got it!

ADD REPLY
0
Entering edit mode
15 months ago
cmdcolin ★ 3.8k

that particular figure was likely created by enrichplot, see http://yulab-smu.top/biomedical-knowledge-mining-book/enrichplot.html#dot-plot

ADD COMMENT

Login before adding your answer.

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