Question: Scatter plot for GSEA results analysis
3
gravatar for FreeMindAlex
4.7 years ago by
FreeMindAlex110
United Kingdom
FreeMindAlex110 wrote:

Hi All,

I really like fig 5A in this paper:

http://www.nature.com/nbt/journal/v31/n1/full/nbt.2450.html

It neatly displays result of the GSEA analysis with an indication of gene set size and P-value. Can anyone help me figure out how to make a graph like this given gene set + enrichment score + P-value + gene set size?

Thanks

Abdul

rna-seq • 4.6k views
ADD COMMENTlink modified 4.1 years ago by siabadaba70 • written 4.7 years ago by FreeMindAlex110

This post was cited in:

Programming of Schwann Cells by Lats1/2-TAZ/YAP Signaling Drives Malignant Peripheral Nerve Sheath Tumorigenesis . Cancer Cell. Volume 33, Issue 2, p292–308.e7, 12 February 2018 https://doi.org/10.1016/j.ccell.2018.01.005

ADD REPLYlink written 2.5 years ago by Pierre Lindenbaum129k
5
gravatar for siabadaba
4.1 years ago by
siabadaba70
siabadaba70 wrote:

Hi, I've run into your question while looking for something else. This gave me great idea to show my own analysis. I've prepared this fig-5A-like plot and I thought to share it. Here is the result picture:

http://imgur.com/XC9dWXJ GSEA Scatter plot

And here is the code (in R):

# Preparing data
data <- data.frame(Gene_set=c("Gene_set1", "Gene_set2", "Gene_set3", "Gene_set4", "Gene_set5"),
                   NES=runif(5, -3, 3),
                   FDR_q.val=runif(5,0,1),
                   No_of_significant_genes=runif(5, 1, 100))

# Plotting
library(ggplot2) 
p <- ggplot(data, aes(NES, Gene_set))
p + geom_point(aes(colour=FDR_q.val, size=No_of_significant_genes)) +
    scale_color_gradientn(colours=rainbow(4), limits=c(0, 1)) +
    geom_vline(xintercept=0, size=0.5, colour="gray50") +
    theme(panel.background=element_rect(fill="gray95", colour="gray95"),
          panel.grid.major=element_line(size=0.25,linetype='solid', colour="gray90"), 
          panel.grid.minor=element_line(size=0.25,linetype='solid', colour="gray90"),
          axis.title.y=element_blank()) +
    expand_limits(x=c(-3,3)) +
    scale_x_continuous(breaks=c(-3,-2,-1,0,1,2,3)) +
    scale_y_discrete(limits=rev(data$Gene_set))
ADD COMMENTlink modified 4.1 years ago • written 4.1 years ago by siabadaba70

Thank you so much for sharing the code! It's awesome!

ADD REPLYlink written 2.4 years ago by n858250

I don't understand what the "number of significant genes" corresponds to in the GSEA results. Is it the number of genes marked as "core enrichment"?

ADD REPLYlink written 9 months ago by guillaume.rbt800
2
gravatar for roy.granit
4.7 years ago by
roy.granit830
Israel/LabWorm
roy.granit830 wrote:

You can get such nice plots using clusterProfiler, as seen here:

http://www.r-bloggers.com/david-functional-analysis-with-clusterprofiler/

ADD COMMENTlink written 4.7 years ago by roy.granit830
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 679 users visited in the last hour