Hi community,
I used sva on DESeq2 normalized count.
mod=model.matrix(~group, colData(dds))
mod0=model.matrix(~1, colData(dds))
sv=svaseq(counts(dds, normalized=TRUE), mod, mod0)
Is it recommended to use these SVs in removeBatchEffect(), and how should it be done if it is recommended?
Thanks.
Thanks ATpoint for your comments. I totally agree with the way how the SVs should be included in the design matrix.
My question is more on
removeBatchEffect()
. If I understand what you've said correctly, assumingnormTransform()
is used, the correction step should be.
Since the SVs is calculated based on the normalized count, as suggested in here, is it more appropriate to use
removeBatchEffect()
based on the normalized count and then return to log scale, such as?
...should work. No need for log2, in- and output of the function is log2.
Sorry about the typo.
It is indeed
.
Do you think it necessary to apply removeBatchEffect() with the expression data and covariates in the same scale? I am a bit concerned here since
assay(ntd)
is inlog2
scale while the covariates are in the normalized count scale.I later find that
removeBatchEffect()
assumeslog-expression values
as input. So it should be fine to useas you've suggested.
Yes, see the help page for this function and the DESeq2 vignette which covers this.