This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to rank genes for GSEA using edgeR-LRT results ?

Hi all,

I'm running GSEA on RNA-seq differential expression results and I’m wondering what’s the best way to rank genes when using edgeR LRT .

I know that for:

DESeq2, it's common to rank by log2FoldChange after shrinkage.

limma-voom, the t-statistic is often used for ranking.

But edgeR-LRT does not provide a t-stat, so I’m not sure what’s most appropriate. Would using logFC alone be enough?

deg edger

2 answers

The best choice would be use edgeR's built-in GSEA functionality provided by camera and cameraPR. These functions adjust for inter-gene correlation, which other ranked GSEA tools do not.

Otherwise, you can use the signed LRT statistic

z <- sign(lrt$table$logFC) * sqrt(lrt$table$LR)

as suggested by ATpoint, which is analogous to the t-statistic from limma-voom.

Finally, if you wanted a shrunk logFC analogous to that from DESeq2, you could use predFC with a large prior.count, say prior.count=5.

If I am using edgeR QLF, can I use the F column for the z calcul?

z <- sign(QLF$table$logFC) * sqrt(QLF$table$F)

Yes. That is a quasi t-statistic.

I assume you mean glmLRT followed by topTags? If so, the LR column could be used, signed for direction of fold change, e.g. with topTags()$tableoutput being tt:

sign(tt$logFC) * tt$LR

or you use signed -log10(pvalue) which is basically the same. I would not use fold change alone since you need the pvalue to decide whether high fold changes are reliable or an artifact of large standard errors.

Don't necessarily need to run topTags. Even with the glmLRT output, lrt say, the signed LRT statistic

z <- sign(lrt$table$logFC) * sqrt(lrt$table$LR)

is a standard normal z-statistic, and would be a good choice for GSEA ranking analyses.

Checking my understanding is correct: GSEA, at least as implemented in clusterProfiler, only uses the rank of the genes, not the quantitative score used for ranking. This should mean that ranking by p-value is equivalent to ranking by t-statistics (or LRT, in the case glm) and sqrt(lrt$table$LR) is the same as lrt$table$LR. However, occasionally I've heard people discussing whether you should use p-value or -log10(pvalue) or t-statistics... Am I missing something? (It's different for logFC, shrunk-logFC, p-value where indeed the ranking may change).

Log in to answer this question.