Hello community,
I have a question which comes to me when I compare the output of these 2 approaches to (in appearance) do the same in DESeq2:
- First way:
AvsB <- results(dge, alpha = 0.05, lfcThreshold = 1, contrast = c("cond","A","B"))
AvsB_tb <- AvsB %>%
data.frame() %>%
rownames_to_column(var="gene") %>%
as_tibble()
AvsB_sig <- AvsB_tb %>%
filter(padj < 0.05 & abs(log2FoldChange) > 1)
- Second way:
AvsB <- results(dge, contrast = c("cond","A","B"))
AvsB_tb <- AvsB %>%
data.frame() %>%
rownames_to_column(var="gene") %>%
as_tibble()
AvsB_sig <- AvsB_tb %>%
filter(padj < 0.05 & abs(log2FoldChange) > 1)
If I missed something obvious sorry
I have read it before come to ask, however I did not understand the difference (not enough background). I do not know if it is possible but could you give me an summarize idea of what approach is "the correct"?
PD: let me apologize about this kind of question, the tool has a great support and the vignette is just clear and useful, the problem it is me.
We recommend in the paper using lfcThreshold:
“It is therefore desirable to include the threshold in the statistical testing procedure directly, i.e., not to filter post hoc on a reported fold-change estimate, but rather to evaluate statistically directly whether there is sufficient evidence that the LFC is above the chosen threshold.”
You’ll notice we have code in the vignette for using lfcThreshold, but not for simple filtering.
Thank you Michael for your time.
Well, I want to warm you about lots of "tutorials" going trough post filters. However, it is our fail to do not go always to the direct source of the method.