Question: Batch effect removal
0
3.0 years ago by
Singapore
Eleni Christodoulou150 wrote:

Dear BioC community,

I am analyzing microarray data from three different batches. There are many technical and biological replicates in the batches. In the past, when I had only two batches, I was using removeBatchEffect function from limma, giving the batch of each sample as argument (with batch=...). I am not sure if this function works with more than two batches... I am alerted because the user guide says 'between' batches and not 'among'.

I also calculated the contrasts of my batches (following the internal removeBtchEffect code) and here is the result:

> batch
[1] 2 2 2 2 2 2 2 3 3 3 2 3 3 3 2 3 3 3 2 2 2 2 3 3 3 2 3 3 3 2 2 2 2 3 3 3 2 2 3 3 3 2 2 3 3 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1
attr(,"contrasts")
[,1] [,2]
1    1    0
2    0    1
3   -1   -1
Levels: 1 2 3

I think it compares the 1st with the 3rd and the 2nd with the 3rd batches. Could you please help with suggestions on how to better understand what happens here? Is it really correcting all 3 batches? If not, shall I look into the ComBat function?

Thank you very much

Eleni

modified 3.0 years ago • written 3.0 years ago by Eleni Christodoulou150
2
3.0 years ago by
Gordon Smyth37k
Walter and Eliza Hall Institute of Medical Research, Melbourne, Australia
Gordon Smyth37k wrote:

removeBatchEffect() works with any number of batches. You simply use

y <- removeBatchEffect(y, batch)

or

y <- removeBatchEffect(y, batch, design=design)

BTW, there is no need to compute your own contrasts. I don't see why the expression "between batches" should cause any confusion but, as it happens, these words do not occur anywhere in the limma documentation.

0
3.0 years ago by
Singapore
Eleni Christodoulou150 wrote:

That simple :) Thank you very much!