Recently, I have seen a post about fgsea
for gene set enrichment analysis. In this DESeq results to pathways in 60 Seconds with the fgsea package. In this post they use stat
values column from Deseq2
results to rank the genes for gene set enrichment analysis.
With edgeR
I use the following code.
fit <- glmQLFit(y, design, robust=TRUE)
contrast.matrix <- makeContrasts(Tumor-Control, levels=design)
qlf <- glmQLFTest(fit, contrast=contrast.matrix)
topTags(qlf)
Coefficient: -1*Control 1*Tumor
logFC logCPM F PValue FDR
Gene1 3.3152959 3.584387 319.9770 2.413285e-17 3.136064e-13
Gene2 1.2035429 9.099493 269.5468 2.402948e-16 1.270767e-12
Gene3 5.5160446 5.575741 690.8451 2.933667e-16 1.270767e-12
Gene4 3.8715029 2.612542 217.3808 4.068607e-15 1.321789e-11
Gene5 2.5809156 3.008769 186.4712 2.934439e-14 7.626608e-11
Gene6 1.0808460 7.195544 143.2828 7.951168e-13 1.722090e-09
Gene7 1.2751258 5.673212 131.3892 2.285582e-12 4.243019e-09
Gene8 2.5480277 2.417406 127.8459 3.178656e-12 5.163329e-09
Gene9 0.8964683 7.478979 121.9161 5.615874e-12 8.108698e-09
Gene10 1.4907664 3.428103 106.5157 2.754773e-11 3.579828e-08
As I use the glmQLFTest
I have the Fstat
in the results. But, I want to get t-statistic values column using edgeR
to rank genes based on that column and use for Gene set enrichment analysis.
Ofcourse, I can use camera
package for this, but I'm interested in ranking genes based on t-statistic and use for GSEA.
How to get the t-statistic using edgeR package?
Thanks Gordon. I also gave a try with
camera
now.For
camera
Is the following a right way?If it is right, can you please tell me how I can get the genes (NGenes) which are enriched in those hallmark pathways. I want their names.
As
?camera
will tell you,Ngenes
is the total number of genes in the set. Besides, there is no concept of explicit enrichment incamera
. The method doesn't draw a line between differential and non-differential genes in the set, it's using the entire distribution of test statistics. You could, of course, draw this line yourself (e.g., taking all genes in the set that exhibit a significant difference in the specifiedcontrast
at a FDR of 5%), but that's not howcamera
is working internally.Gordon may I know your answer for my previous comment. thanks