Does DESeq2 correct for library size when importing the counts with DESeqDataSetFromMatrix?
1
2
Entering edit mode
5 months ago
bioinfo ▴ 150

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

rna-seq deseq2 • 619 views
ADD COMMENT
0
Entering edit mode

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.

ADD REPLY
2
Entering edit mode
5 months ago

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.

ADD COMMENT

Login before adding your answer.

Traffic: 2405 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6