[BioC] makeContrasts function

konika chawla chawla at bio.ntnu.no
Thu Oct 6 10:43:45 CEST 2011


Hi
I have two questions
I used the script below to get pair wise fold change and overall adj P val.

library(affy)
library(limma)
data <- ReadAffy()
eset <- rma(data)
design <- model.matrix(~ 0+factor(c(1,2,3,4,5,6,1,2,3,4,5,6,1,2,3,4,5,6)))
colnames(design) <- c("ni_4dpi", "mock_4dpi", "ormv_4dpi","ni_5dpi", 
"mock_5dpi", "ormv_5dpi")
fit <- lmFit(eset, design)
contrast.matrix <- makeContrasts(,levels=design)
fit2 <- contrasts.fit(fit, contrast.matrix)
fit2 <- eBayes(fit2)
tab_all<-topTable(fit2, adjust="BH",number=22810)
head(tab_all)


This gave me 9 pairs of comparisons with adjusted P values
  I am trying to repeat it but get the error

 > contrast.matrix <- makeContrasts(,levels=design)
Error in is.character(ej) : 'ej' is missing
why?

Secondly I am more interested in ormv_4dpi-ni_4dpi and ormv_5dpi -ni_5dpi
but, If I specify the 2 pairs to be compared the P values is very bad ,
P value decreases with the number of pairs in contrast matrix--how?

Thanks in advance.

Konika



More information about the Bioconductor mailing list