Thank you for the help! That makes sense.
I will probably just remove the NAs (there are about 6500 padj NAs out of 20,000 rows) and keep the independent filtering on.
Hello, I am running GSEA in R using the fgsea package and using stat from the DESeq2 output. With my DESeq2 output, I removed genes that have no DESeq2 data (log2FC, stat, p, etc...).
Question: I was wondering if I also need to remove rows with padj=NA. I have a couple of genes that have baseMean, log2FC, lfcSE, stat, pval but no padj (probably due to the threshold).
What should I do with these genes? They are still processed in fgsea as I am working with stat and not the p value.
Thanks!
first, take a look at those genes, what are the gene types? (non-coding RNA?). Are they expressed at very low level? how many of them? most of the time, it is probably okay to just remove them and rank the gene list using stat or the p-value.
btw, this video may help a little too
The NAs come from the independent filtering and outlier removal of DESeq2.
The statistics behind fgsea rely on ranks and permutations. Hence, you cannot just put the NAs to some value (like 0) as this results in many arbitrary rank ties which might skrew that pvalue calculation.
Two options:
DESeq() as suggested in the vignette, or using edgeR::filterByExpr to really focus on genes with sufficient counts for analysisThank you for the help! That makes sense.
I will probably just remove the NAs (there are about 6500 padj NAs out of 20,000 rows) and keep the independent filtering on.
Log in to answer this question.