This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Normalization function in DEseq2

Hi all,

I am try to work with normalization count data using DEseq2. I am trying their tutorial, until the normalization part.

dds <- estimateSizeFactors(dds)

There are different output from their code:

counts(dds, normalized=TRUE)

with when I compute manually:

counts(dds, normalized=FALSE) / sizeFactors(dds)

The author mentioned in this that the normalization data can be computed by divide the counts by sizeFactors(), but why do their function generate differ result compare to when I compute manually.

Does anyone have this issue before?

deseq2

1 answer

counts(dds, normalized=FALSE) / sizeFactors(dds)

This line is wrong. It must be t(t(counts(dds, normalized=FALSE)) / sizeFactors(dds)) as this is how in R division works when you have one size factor per sample. You first have to transpose the matrix so each sample is a row, and then eventually transpose back. This will give identical results to counts(dds, normalized=TRUE).

TRUE!

Thank you so much!

Log in to answer this question.