This is a test version of Biostars. For the public version, visit https://www.biostars.org.
batch effect Deseq2 Wald test

Hi all,

I'm using Deseq2 to analyze a set of data with a relevant batch effect related to the library preparation day. I used the LR test and added the batch effect. It worked but I'd like to have comparisons between the specific conditions.

Is it possible to use the Wald test while controlling a batch effect??

Thank you for your time and support!

Best Marianna

rna-seq deseq2 batch wald test

1 answer

Yes, a Wald test is quite flexible (it's usually easier to deal with than an LRT) and you can use it by not specifying LRT in DESeq2 (the default is a Wald test).

Thank you Davon Ryan,

So to control for batch effect and perform a Wal test I should use the following approach

dds <- DESeqDataSetFromMatrix(countData = cts,
                              colData = coldata,
                              design = ~ batch + condition)

dds <- DESeq(dds, reduced=~batch)

Is it correct?

Thank you!

Best

Marianna

You don't need reduced=~batch, since there's no reduced model used.

Ok, so with the Wald test you cannot control the batch effect. Isn't it?

Marianna

I'm not sure how you got that interpretation, you control it by adding it to your model, just as in an LRT.

Log in to answer this question.