Handling batch effect with Limma
1
0
Entering edit mode
ginlucks • 0
@ginlucks-15159
Last seen 3.7 years ago
Italy

Hi everybody,

I read a lot of threads but probably I miss the right one...anyway here is my question:

I have an expression matrix (expressionData) with 2 different conditions: HLT and TUM These two conditions derives from aggregating data from 3 different experiments (which use different platforms also). I want to compare HLT vs TUM minimizing the batch effect, thus I implemented in the design matrix both the condition and the experiment info:

g = c(rep('HLT',9),rep('TUM',9))
conditions = factor(g, levels = c('HLT','TUM'))
b = rep(c(rep('EXP1',3),rep('EXP2',3),rep('EXP3',3)),2)
batch = factor(b, levels = c('EXP1','EXP2','EXP3'))
designMatrix = model.matrix(~0+conditions+batch)

At this point I have some doubts about comparing HLT vs TUM (commands below). By default it seems that Limma using this designMatrix compares everything (conditions + batch) vs gene expressions in EXP1.

fitBatch = lmFit(expressionData, designMatrix)
fitBatch = eBayes(fitBatch)

Thus, I created a contrast matrix to specify the comparison to perform

contrast.matrix = makeContrasts(TUM-HLT, levels=designMatrix)
fitBatch = contrasts.fit(fitBatch, contrast.matrix)
ttBatch = topTable(fitBatch, num=Inf)

Result shows very low adj.P.vals (all genes pass the 0.05 filter) and that sounds strange since I'm comparing different experiments using different platforms and also different tissues.

Where is the error? What I did wrongly?

batch effect limma batch effect correction • 925 views
ADD COMMENT
1
Entering edit mode
@gordon-smyth
Last seen 1 hour ago
WEHI, Melbourne, Australia

You have to run eBayes again after running contrasts.fit.

See https://support.bioconductor.org/p/117840

ADD COMMENT

Login before adding your answer.

Traffic: 375 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