Closed zktuong closed 2 years ago
Hi Kelvin,
Thanks for the comment. Just to be clear: while the sizeFactors are often stated/estimated as total library size (i.e. sum of all counts in a sample), for fitting the glmer model it's important that we use the normFactors directly - we need them to be close to 1 for most samples. sizeFactors are passed into the model as offset = log(sizeFactors). Large values for sizeFactors tends to cause problems with fitting the model. DESeq2 does the same thing: its estimateSizeFactors
function centres the rows on 1. So the additional step of multiplying by lib.size
is not required and in fact it's better not to inflate the sizeFactors
.
Myles
hi,
in your vignette under size factors,
when using:
the sizeFactor should have an additional step like:
sizeFactors <- dgelist$samples$lib.size * dgelist$samples$norm.factors
because in the
calcNormFactors
details, they explicitly state:https://rdrr.io/bioc/edgeR/man/calcNormFactors.html
related to #20