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
Here's a link to an answer I wrote a few years ago for using the gene set testing package *goseq* following *DESeq2*:

https://support.bioconductor.org/p/64811/#64815

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.