Hi,
according to my script here below, why DESEq2 calculations and my own are not identical? What am I missing?
Any halp will be most welcome, thanks.
David
dds<- makeExampleDESeqDataSet(n=100,m=18)
dds <- DESeq(dds, betaPrior = FALSE)
resultsNames(dds)
res <- results(dds)
res[1,2]
# [1] -0.3811565
my.log2FoldChange <- log(rowMeans(counts(dds[,10:18],normalized=TRUE))[1]/rowMeans(counts(dds[,1:9],normalized=TRUE))[1],2)
my.log2FoldChange
# -0.3792306
res[1,3]
# [1] 0.2197007
my.lfcSE <- sd(log(counts(dds[1,10:18],normalized=TRUE)/counts(dds[1,1:9],normalized=TRUE),2))/sqrt(8)
# [1] 0.2036169
Thanks a lot. That will help.
Best,
David.