Hi,
You told that:
I have always being told that in order to get log2foldchange values in DESeq2, one would just need to set:
res$log2FoldChange) >= log2(1.5)
Is this in the DESeq2
vignette?
So, I think there is two things that are important to discuss to touch in your question.
(1) Thresholds are at some extent arbitrarily chosen, like p-value<0.05
, whereas others would say that this is not good enough and they prefer to be more stringent, and so they'll use p-value<0.01
. Actually, in some particular situations a threshold of p-value<0.1
would be good enough. That said you need to understand that a threshold is at some extent arbitrary. In this case usually I see people saying that they "believe" that a gene is differently expressed if this gene has a FDR/adjusted p-value < 0.05 and a log2 fold-change higher or lower than 2. A log2 FC of 2 or -2 means a ratio of 4 or -4 between the two conditions being compared. Others would go for a less stringent threshold of >1 or <-1 that consists in a ratio of >2 or <-2, i.e., if gene A has a log2 FC of 1, it means that is expressed twice as much in treatment condition than control. Is this enough? Should I use a threshold of 1/-1 or 2/-2? Well it depends on you. You should not trust blindly on these thresholds.
(2) If you want to filter, do not forget that you have positive log2 FCs for the upregulated genes on the treatment condition, but you also have negative log2 FCs for downregulated genes on the treatment condition. If you want to filter differentially expressed genes based on log2 FC, you probably want to get both, let's say <-1.5 or >1.5. That said I think this command res$log2FoldChange) >= log2(1.5)
does not make sense to me. Probably what people told you is that you can filter the log2 FC by a ratio of 1.5, and I guess what they mean was:
abs(res$log2FoldChange) >= 1.5 # this will return a logical of TRUE/FALSE for log2 FC <= -1.5 and >= 1.5
I hope this helps,
António
if you want Fold Change above 1.5 than you need to set the limit for log2FoldChange at log2(1.5), not 1.5.