Setting up my design matrix
0
2
Entering edit mode
8.0 years ago
marion.ryan ▴ 50

I think I am having an issue with my contrast matrix, in terms of comparing concentrate versus grass fed animals (RMA normalised = eset). I get an output of DE genes, but none of them are differently expressed (Adj P value) and the gene list is different from that of a previous and I believe correct analysis, by an experienced bioinformatition who has now left. Any insight in to this would be greatly appreciated, code below. 1st 7 CEL files =Concentrate 2nd 7 CEL files =Grass

Matrix design

###################################################
design <- model.matrix(~ 0+factor(c(1,1,1,1,1,1,1,2,2,2,2,2,2,2)))
colnames(design) <- c("Concentrate", "Grass")
fit <- lmFit(eset, design)**

###################################################
###Contrast Matrix-new 
###################################################
contrast.matrix <- makeContrasts(Concentrate - Grass, levels=design)
fit2 <- contrasts.fit(fit, contrast.matrix)
fit2 <- eBayes(fit2) 

###################################################
###Output –differentially expressed genes 
###################################################
topTable(fit2,coef=NULL,number=500,genelist=fit2$genes,adjust.method="BH",sort.by="B",resort.by=NULL,p.value=1,lfc=0)
tt=topTable(fit2, number = 150)
write.table(tt, "ConcentratevGrass.txt", sep = "\t")
R • 3.1k views
ADD COMMENT
1
Entering edit mode

It all looks fine to me, aside from the '**' after lmFit. Was there any blocking used in setting up the experiment?

ADD REPLY

Login before adding your answer.

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