Hi all,
I hope to get some clarification regarding the sorting of log2FC or FC for GSEA.
In decreasing
order, the positive log2FC would make sense as larger absolute values will be at the top of the list, but negative FC values with larger absolute values (i.e., smaller negative FC) will be deprioritised and placed at the bottom of the ranked gene list.
Does this mean I should order the negative FC in an increasing order while ordering the positive FC in a decreasing order?
Thank you for your help!
Thank you ATpoint for your response!
In the result of GSEA, like you indicated, there will be gene sets that have positive NES and gene sets that have negative NES values
(scoreType = "std")
. Assuming the ranked (by log2FC) list of genes that was used for this GSEA was derived from DESeq comparing Subset1 vs Subset2 (Subset2=reference). This list again has both negative and positive log2FC genes.Might I ask if it is accurate to interpret/infer that among p.adjust <0.05 gene sets from GSEA, NES>0 gene sets were significantly enriched in Subset1, and NES<0 gene sets were significantly enriched in Subset2?
Or, would I need to do a separate DESeq comparing Subset2 vs Subset1 (setting Subset1 as reference) to get the significantly enriched gene sets for Subset2?
I asked because the GSEA result (from input list of comparing Subset1 vs Subset2), the significant gene sets were all NES>0.
Thank you again for your help!
NES > 0
means that your gene set has more genes with positive logFC/stat. In your case these genes should be up in Subset1. However, if you are not sure, I always recommend to visualize the data and see for yourself. You can do a heatmap of theleadingEdge
genes, for example, or all of the genes in the pathway.scoreType = "std"
makes fgsea to look for both positive and negative enrichment, you don't need to reverse the comparison, the results will be identical. If all of the significant gene sets have NES>0, then there aren't really negative enriched gene sets. If you're specifically interested in down-regulated gene sets, you can specifyscoretype="neg"
, which would makefgsea
to look only for down-regulated sets, but normally that shouldn't be done.