Hi! I am doing pairwise comparisons with DESeq2 (version 1.24.0). I would like to shrinkage the log2 Fold Change using the normal approach. I used the following code:
dds <- DESeqDataSet(se_sel, ~ condition)
dds <- DESeq(dds)
resNorm <- lfcShrink(dds, contrast=c("condition", cond1 , cond2 ), type="normal")
resNorm
log2 fold change (MLE): condition cond1 vs cond2
Wald test p-value: condition cond1 vs cond2
baseMean log2FoldChange lfcSE
<numeric> <numeric> <numeric>
ENSG00000015592 2252.24746949959 4.93239360176146 0.129430249903588
ENSG00000083857 38573.0261803919 3.96140286121604 0.0734986203310571
ENSG00000090339 2854.89111431782 4.08839129938656 0.10107762978087
ENSG00000171551 12450.6367006511 6.65073841803356 0.132315837227065
ENSG00000076356 8747.08707079265 -3.53308614922331 0.0955398226626009
I was wondering if it is correct to shinkage the LFC with the function lfcShrink or considering that I am using normal approach it is better to run DESeq function with betaPrior=TRUE and then use the function result with contrast to extract the results. In addition, I will considered in my analysis the file with shunkage LFC (resNorm). Is that correct?
Thank you for your help!
Concetta
Hi! After your answers I tested the apeglm and ashr LFC shrinkage methods. I used the following code:
Setting the option
returnList = TRUE
I did not understand how to use the output of apeglm or ashr. Can I do just a filtering based on the s-value? In addition, when I draw the MA plot I got this message:What does it means? It indicates that it take into account only genes with ajusted p-value < 0.005.
Concerning the LFC shrinkage, I have a couple of questions about the result:
In addition I would like to ask which is the best approch to filter differentially expressed genes exploiting s-value and/or adjusted p-value:
Thank you for your help!
Concetta
"Can I do just a filtering based on the s-value?"
Yes, this will give a set of genes satisfying an aggregate FSR (see references). You can choose the threshold yourself (
plotMA
has an argumentalpha
). See the apeglm vignette for some discussion, but I'd set it a bit lower than the typical 0.05, perhaps 0.01 or 0.005.Regarding the methods, we recommend apeglm or ashr, given the results from the apeglm publication. We don't recommend
type="normal"
anymore.Regarding adjusted p-value or s-value, you're better off picking one or the other, don't combine these two in your results. These are different frameworks. There are good arguments for using s-values, but I admit that most papers continue to use adjusted p-values.
OK thank you so much for your reply. I would like to ask just a clarification about DESeq2. If I understood well the DESeq2 do not perform the shrinkage of log2 Fold Change and so in the results table I have
log2 fold change (MLE): dex trt vs untrt
that indicates that the LFC is not shrinked. If I want to shrink the log2 fold change I have to use the functionlfcShrink
. Subsequently, for the downstream analysis if I want to filter genes based on the effect of the treatment it is better to consider the shrinked fold change. Is that correct?You can filter on the "un-shrunken" or MLE LFC, just use
lfcThreshold
. Search the vignette for this term.I tested lfcThreshold on my data in the us-shrunken" MLE LFC. However, why did I obtain a different results from the result that I obtained with the following command?
In addition, do you suggest to work on us-shrunken" MLE LFC or on shrunken apeglm LFC?
That is answered in the 2014 paper, where we describe what the methods are doing.
If you just want to do what most DESeq2 users are doing in papers then it’s adjusted pvalues and maybe lfcThreshold. But it’s up to you.