Question: Gene Set Enrichment Analysis after DESeq2
gravatar for Sreeraj Thamban
3.3 years ago by
Indian Institute of Science Education and Research
Sreeraj Thamban220 wrote:

Hello Biostars, Can anyone tell me how to prepare input data set for GSEA after Differential Gene Expression Analysis by DESeq2? How will I rank the genes? Should I rank based on log2FC or Adjusted P value? Is there any way to generate a GSEA ready data directly from DESeq2?. I was using topGo for gene ontology enrichment analysis before and recently came across GSEA. Which one is better GO enrichment analysis or GSEA? Even after going through the papers I couldn't find a significant difference between above two.

Thank you

ADD COMMENTlink modified 2.2 years ago by enxxx23240 • written 3.3 years ago by Sreeraj Thamban220

I like DESeq2. It would be great to have in the future something like ROAST/CAMERA/GSEA in DESeq2 too!

ADD REPLYlink written 2.2 years ago by enxxx23240
gravatar for Prakash
3.3 years ago by
Prakash2.1k wrote:

Hi Sreeraj

Genes can be ranked based on fold change and P value and that can be used in GSEA package.

you can use this R code for this purpose.

x <- read.table("DE_genes.txt",sep = "\t",header = T)
x$fcsign <- sign(x$log2.fold_change.)
x$metric= x$logP/x$fcsign
y<-x[,c("Gene", "metric")]
ADD COMMENTlink modified 3.3 years ago • written 3.3 years ago by Prakash2.1k

in this case, what parameter should we input into GSEA?

ADD REPLYlink written 3.1 years ago by langya90

How would you handle NA values?

ADD REPLYlink written 2.1 years ago by t-jim30


filtered <- na.omit(y)

write.table(filtered ,file="DE_genes.rnk",quote=F,sep="\t",row.names=F)
ADD REPLYlink written 18 months ago by Barry Digby630

I have used this code but am struggling to obtain a table where the gene names are appearing as names and not numbers, for some reason it keeps saving a table with the ranks but no gene names.

ADD REPLYlink written 18 months ago by g.birch150

Try row.names = TRUE.

Also, you want to use col.names = FALSE, as GSEA complains when 'Gene' and 'metric' are in the rnk. file.

ADD REPLYlink written 18 months ago by Barry Digby630
gravatar for Michael Love
3.3 years ago by
Michael Love2.1k
United States
Michael Love2.1k wrote:

Here's a link to an answer I wrote a few years ago for using the gene set testing package goseq following DESeq2:

I'm not sure what kind of input GSEA takes. I also like the methods behind ROAST and CAMERA from the limma package, but I haven't yet worked on integrating with those methods. For those two, you would need to run a limma analysis upstream.

ADD COMMENTlink written 3.3 years ago by Michael Love2.1k

Hey I noticed in the newest DESeq2 version, the default setting of fold change is not shrunken fold change, may I ask why? i thought the shrunken fold change gives you higher confidence.

ADD REPLYlink written 2.8 years ago by langya90

You can generate these via lfcShrink()

ADD REPLYlink written 3 months ago by Kevin Blighe69k
Please log in to add an answer.


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