Hello,
I normally run DESeq2 by importing the data with tximport.
However, this time I was given a counts csv file and imported the counts with DESeqDataSetFromMatrix. I noticed that when I create the dds object with the counts file I get different messages.
When importing files with DESeqDataSetFromMatrix I get the below:
estimating size factors
estimating dispersions
gene-wise dispersion estimates
mean-dispersion relationship
final dispersion estimates
fitting model and testing
When importing with tximport:
summarizing abundance
summarizing counts
summarizing length
using counts and average transcript lengths from tximport
estimating size factors
using 'avgTxLength' from assays(dds), correcting for library size
estimating dispersions
gene-wise dispersion estimates
mean-dispersion relationship
final dispersion estimates
fitting model and testing
Does that mean that when I import the counts with DESeqDataSetFromMatrix the counts are not corrected for library size?
Thank you
1 answer
In both cases, you'll see the step
estimating size factors
This is DESeq correcting for library size - the "size" factor is the inter library normalisation factor calcuated for each library and applied as an offset in the negative binomial model. It is not quite the library size, but is related to it, and has the effect of correcting for the bias that is introduced by having libraries of different sizes.
Log in to answer this question.
Curious if anyone has an answer, but you could look at the correlation between the normalized counts from the two import methods and get a quicker answer.