Hi Dear BioC-users! I have a question concerning batch effect using Limma. I searched through the BioC and R archives but didn't find the answer to my question. Suppose I have the folling three factors: /f1<-as.factor(c(rep("WT",18),rep("KO",18))) f2<-as.factor(c(rep("d15",3),rep("m1",3),rep("m3",6),rep("m5",3),rep("m8",3),rep("d15",3),rep("m1",3),rep("m3",6),rep("m5",3),rep("m8",3))) f3<-as.factor(c(rep("n",24),rep("f",6),rep("n",6))) / f1 is the type, f2 the stage in which the sample was collected and f3 the m3 KO samples that have a clear batch effect. The idea is to try to modell this batch effect of the m3 KO mice. Hence, /design<-model.matrix(~0+f1+f2+f3) design / Obtaining the following design: f1KO f1WT f2m1 f2m3 f2m5 f2m8 f3n 1 0 1 0 0 0 0 1 2 0 1 0 0 0 0 1 3 0 1 0 0 0 0 1 4 0 1 1 0 0 0 1 5 0 1 1 0 0 0 1 6 0 1 1 0 0 0 1 7 0 1 0 1 0 0 1 8 0 1 0 1 0 0 1 9 0 1 0 1 0 0 1 10 0 1 0 1 0 0 1 11 0 1 0 1 0 0 1 12 0 1 0 1 0 0 1 13 0 1 0 0 1 0 1 14 0 1 0 0 1 0 1 15 0 1 0 0 1 0 1 16 0 1 0 0 0 1 1 17 0 1 0 0 0 1 1 18 0 1 0 0 0 1 1 19 1 0 0 0 0 0 1 20 1 0 0 0 0 0 1 21 1 0 0 0 0 0 1 22 1 0 1 0 0 0 1 23 1 0 1 0 0 0 1 24 1 0 1 0 0 0 1 25 1 0 0 1 0 0 0 26 1 0 0 1 0 0 0 27 1 0 0 1 0 0 0 28 1 0 0 1 0 0 0 29 1 0 0 1 0 0 0 30 1 0 0 1 0 0 0 31 1 0 0 0 1 0 1 32 1 0 0 0 1 0 1 33 1 0 0 0 1 0 1 34 1 0 0 0 0 1 1 35 1 0 0 0 0 1 1 36 1 0 0 0 0 1 1 As it could be notice, the d15 dissapeared, maybe due to lineal dependency? Now, my question is if I'm doing right with the following contrast: /cont.matrix<-make.Contrasts(KO1mvsWT1m=f2m1+(f1KO-f1WT), levels=design) cont.matrix / Obtaining the following: Levels KO1mvsWT1m f1KO 1 f1WT -1 f2m1 1 f2m3 0 f2m5 0 f2m8 0 f3n 0 As I mentioned before, I would like to obtain the differences between KO and WT (in this case the m1 old mice) but subtracting the batch effect caused by the six m3 KO samples (as defined by factor f3). 1) Am I doing right formulating the contrast the way I described it in /cont.matrix/? 2) How can I rescue de d15 information? Thanks in advance! Regards, Paul -- Paul C. Schröder PhD-Student Division of Proteomics, Genomics & Bioinformatics Center for Applied Medicine (CIMA) University of Navarra Avda. Pio XII, 55 E-31008 Pamplona, Spain Tel: +34 948 194700, ext 5032 email: pschrode@alumni.unav.es [[alternative HTML version deleted]]