Hello,
In a multi-factor DESeq2 design, it accounts for the changes in one group while testing for changes in others. In section 1.5 of the vignette for example it controls for type while testing for differences in condition. I assume it calculates a normalization factor + size factor and then adjusts the counts accordingly?
In that example in the vignette is it possible to access the counts which have been normalized for type and size factor?
Thanks
Awesome, thanks!
Michael,
How can I modify the model and extract batch effect-normalized counts in R commands? Or do I have to overwrite some implemented functions?
Tom
See here:
DESeq2 - Acquiring batch-corrected values for PCA and hierarchical clustering
Thank you for your reply.
When I do
removeBatchEffect()
, should the 'batch' function be set, i.e.removeBatchEffect(rlogMat, batch=MyBatch)
?With '
batch=NULL
', I only got the same matrix as the input rlogMat, and with 'batch=MyBatch
', the output matrix was somewhat different.Because, as far as I understand, rlog/vst are the values already normalized for mean shifts, I am wondering whether setting '
batch=MyBatch
' forremoveBatchEffect()
would be double counting?Thanks,
Yes, you should provide the variable, for which you want removeBatchEffect() to remove associated variation.
No, rlog and VST do not normalize for mean shifts associated with variables in the design. This is explained in the vignette in the section on transformations and in the man pages for the functions.
The only information that uses the design is the global trend (the trend across all genes) of estimated dispersions over the mean (when blind=FALSE).
Thanks, I was assuming rlog/vst normalize batch-based trend when blind=FALSE.
If the data has obvious batch effect and I want to do downstream analyses such as unsupervised clustering with batch effect-free expression values, would removeBatchEffect() output be more appropriate than rlogMat?