Entering edit mode
I want to get differentially expressed genes with: [padj < 0.05 and log2FC > 1(up-regulated)] and [padj < 0.05 and log2FC < -1 (down-regulated)]. Using alpha=0.05, lfcThreshold = 1 i get far less genes compared to when I subset using res$padj < 0.05 & res$log2FoldChange > 1. I am not able to understand what's going on, even through the vignette. Would really appreciate your help!
res <- results(dds)
res
log2 fold change (MLE): condition treated vs untreated
Wald test p-value: condition treated vs untreated
DataFrame with 9921 rows and 6 columns
baseMean log2FoldChange lfcSE stat pvalue padj
<numeric> <numeric> <numeric> <numeric> <numeric> <numeric>
FBgn0000008 95.14429 0.00227644 0.223729 0.010175 0.9918817 0.997211
FBgn0000014 1.05652 -0.49512039 2.143186 -0.231021 0.8172987 NA
FBgn0000017 4352.55357 -0.23991894 0.126337 -1.899041 0.0575591 0.288002
FBgn0000018 418.61048 -0.10467391 0.148489 -0.704927 0.4808558 0.826834
FBgn0000024 6.40620 0.21084779 0.689588 0.305759 0.7597879 0.943501
... ... ... ... ... ... ...
FBgn0261570 3208.38861 0.2955329 0.127350 2.3206264 0.020307 0.144240
FBgn0261572 6.19719 -0.9588230 0.775315 -1.2366888 0.216203 0.607848
FBgn0261573 2240.97951 0.0127194 0.113300 0.1122634 0.910615 0.982657
FBgn0261574 4857.68037 0.0153924 0.192567 0.0799327 0.936291 0.988179
FBgn0261575 10.68252 0.1635705 0.930911 0.1757102 0.860522 0.967928
summary(res)
out of 9921 with nonzero total read count
adjusted p-value < 0.1
LFC > 0 (up) : 518, 5.2%
LFC < 0 (down) : 536, 5.4%
outliers [1] : 1, 0.01%
low counts [2] : 1539, 16%
(mean count < 6)
[1] see 'cooksCutoff' argument of ?results
[2] see 'independentFiltering' argument of ?results
res05 <- results(dds, alpha=0.05, lfcThreshold = 1)
summary(res05)
out of 9921 with nonzero total read count
adjusted p-value < 0.05
LFC > 1.00 (up) : 17, 0.17% #up-regulated?
LFC < -1.00 (down) : 26, 0.26% #down-regulated?
outliers [1] : 1, 0.01%
low counts [2] : 0, 0%
(mean count < 1)
[1] see 'cooksCutoff' argument of ?results
[2] see 'independentFiltering' argument of ?results
sum(res$padj < 0.05 & res$log2FoldChange > 1, na.rm=TRUE)
115 #up-regulated
sum(res$padj < 0.05 & res$log2FoldChange < -1, na.rm=TRUE)
107 #down-regulated
You may have a look at the answer of this post : Deseq2: padj value changes with varying alpha