This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Affymetrix Mouse 2.0 array analysis using LIMMA in R

I am trying to analyse Mosue Affymetrix array.

I want to make 7 different comparison from 8 samples , there is one control sample.

I am trying to use makeContrasts option and I am stucked, can anyone help me ?

affymetrix array r

Please post your experimental design

1 answer

If you have something like this in the pdata.txt file

enter image description here

To compare the control to the others you can try this:

pd <- read.AnnotatedDataFrame(filename="pdata.txt")

cont <- c("control_1", "sample_2", "sample_3", "sample_4", "sample_5", "sample_6", "sample_7", "sample_8",) 

compare_all   <- c(paste(cont[1],"-",cont[2], sep=""),
                   paste(cont[1],"-",cont[3], sep=""),
                   paste(cont[1],"-",cont[4], sep=""),
                   paste(cont[1],"-",cont[5], sep=""),
                   paste(cont[1],"-",cont[6], sep=""),
                   paste(cont[1],"-",cont[7], sep=""),
                   paste(cont[1],"-",cont[8], sep=""))

times  <- as.factor(pd$Type) 
design <- model.matrix(~0+times) 
colnames(design) = levels(times) 
contrast.matrix <- makeContrasts(contrasts = compare_all, levels=design)

Log in to answer this question.