zinbwave-deseq2 icon indicating copy to clipboard operation
zinbwave-deseq2 copied to clipboard

What's the best way to adjust the sample batch covariable?

Open Yunuuuu opened this issue 4 years ago • 2 comments

Hi, mikelove, I used to apply DESeq2 to analysis bulk RNA-seq dataset, where we can correct for the batch effects by including them in the design matrix of DESeq2. further, by combining zinbwave with DESeq2, we can analysis single-cell RNA-seq data, and both of them can adjust the sample level batch effect.

There will be three choice to do that, let's focus on the same dataset zinb (has filtered genes with low counts) in the vignette here; and we hypothesize a sample-level covariable batch existing in it. we'll take it as the example data below

First, Only correct for the batch effects with zinbwave

zinb <- zinbwave(zinb, X = "~batch", K=0, observationalWeights=TRUE,
                   BPPARAM=SerialParam(), epsilon=1e12)
dds <- DESeqDataSet(zinb, design=~condition)
sizeFactors(dds) <- sizeFactors(scran::computeSumFactors(dds))
dds <- DESeq(dds, test="LRT", reduced=~1,
               minmu=1e-6, minRep=Inf)

the second, Only correct with DESeq2

zinb <- zinbwave(zinb, K=0, observationalWeights=TRUE,
                   BPPARAM=SerialParam(), epsilon=1e12)
dds <- DESeqDataSet(zinb, design=~batch + condition)
sizeFactors(dds) <- sizeFactors(scran::computeSumFactors(dds))
dds <- DESeq(dds, test="LRT", reduced=~batch,
               minmu=1e-6, minRep=Inf)

the third, combine zinbwave with deseq2

zinb <- zinbwave(zinb, X = "~batch", K=0, observationalWeights=TRUE,
                   BPPARAM=SerialParam(), epsilon=1e12)
dds <- DESeqDataSet(zinb, design=~batch + condition)
sizeFactors(dds) <- sizeFactors(scran::computeSumFactors(dds))
dds <- DESeq(dds, test="LRT", reduced=~batch,
               minmu=1e-6, minRep=Inf)

from https://genomebiology.biomedcentral.com/articles/10.1186/s13059-018-1406-4, it seems Van den Berge uses the first one, I don't know which is the best.

Yunuuuu avatar Sep 17 '20 09:09 Yunuuuu

This is a good question but I think you’d get the best advice by posting to support site, as Koen and Davide would know better than I.

mikelove avatar Sep 17 '20 10:09 mikelove

Thanks for ur advice!!

Yunuuuu avatar Sep 17 '20 14:09 Yunuuuu