How to proceed after removing batch effect with limma?
1
1
Entering edit mode
5.4 years ago
slapiiv ▴ 60

Hi everyone, I have visualized some batch effects in my sequencing replicates and I have removed with the limma package as follows.

mat <- limma::removeBatchEffect(mat, vsd$batch)

After that, batch effect has been at least minimized and the PCA looks very good as I expected, however, at this point how can I proceed after this process? Can I use the normalized matrix for deseq? How can I perform the DE with the new matrix? is that possible? My deseq object looks like:

dds <- DESeqDataSetFromMatrix(countData = countData
                              , colData = colData
                              , design = ~ tissue + batch)
RNA-Seq deseq2 batch-effect limma • 5.7k views
ADD COMMENT
1
Entering edit mode

The DESeq2 vignette says the limma::removeBatchEffect( ) function is used only for visualization. The Quick start section of the vignette already shows how to control for simple batch effects, the issue is discussed in other sections of the vignette as well.

dds <- DESeqDataSetFromMatrix( countData = countData,
                               colData = colData,
                              design = ~ batch + tissue )
ADD REPLY
0
Entering edit mode

Thanks h.mon, so, basically I just can remove it for visualization but not for the calculation of DE?

ADD REPLY
0
Entering edit mode

You do not remove batch effect to calculate DE genes, you include it as a factor in the linear model by putting it in the design just like you did. It's magically simple.

ADD REPLY
1
Entering edit mode
5.4 years ago
Pietro ▴ 240

Dear slapiv,

Some RNA-Seq guru might help here, but I think that, including batch in the design formula as you did, is fine and nothing else is required. (from DESeq2 vignette, Quick start section, ~ batch + tissue).

Usually what I do is to remove the batch effect from the normalized matrix for downstream purposes, like

vsd_nobatch <- removeBatchEffect(assay(vsd), batch = factor(sample_matrix$Batch))
ADD COMMENT
0
Entering edit mode

Thanks Pietro, I have found the answer:

dds <- DESeq(dds, test="LRT", reduced=~batch)
ADD REPLY
0
Entering edit mode

Be careful because the Likelihood ratio test is just a different test from the default Wald test. The LRT is not something specifically related to the batch effect.

From DESeq2 vignette

"The LRT is therefore useful for testing multiple terms at once, for example testing 3 or more levels of a factor at once, or all interactions between two variables.".

ADD REPLY

Login before adding your answer.

Traffic: 1870 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6