DESeq2: How to get sizeFactor per library when importing counts with tximport?
1
0
Entering edit mode
Jon Bråte ▴ 250
@jon-brate-6263
Last seen 2.6 years ago
Norway

This is the first time I've tried to import Kallisto output using tximport for use in DESeq2. I want to get the sizeFactors calculated by DEseq2 and use them for normalizating counts from another experiment. But I am only able to get size factors for each gene individually (normalizationFactors(dds)), and not each library combined. Should I compute the mean for each column or something like that?

 

Thanks, Jon

deseq2 • 755 views
ADD COMMENT
2
Entering edit mode
@mikelove
Last seen 3 hours ago
United States

The column mean of normalization factors will be something like the size factor, yes.

If you want the size factors just as they are computed by DESeq2, you can do the following:

normMatrix <- assays(dds)[["avgTxLength"]]
normMatrix <- normMatrix / exp(rowMeans(log(normMatrix)))
sf <- estimateSizeFactorsForMatrix(counts(dds) / normMatrix)
ADD COMMENT
0
Entering edit mode

Perfect! Thanks!!

ADD REPLY

Login before adding your answer.

Traffic: 864 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