# assist in design matrix,contrast matrix using limma

#### fbsja

##### New Member
Hi all,
I'd really appreciate if someone can explain to me whether I've taken the following steps correctly. I'm trying to find the difference in gene expression between (wt vs mutant) for illumina mouse data(MouseWG-6 v2.0 chip). I used a design and contrast matrix (although i'm not sure whether i really need the contrast matrix).

Script :

exprs(BSD.quantile)->matrixExprs
design<-model.matrix(~-1+factor(c(1,1,1,1,1,2,2,2,2,2,2)))
colnames(design)<-c("group1","group2")
fit<-lmFit(matrixExprs,design)
contrast.matrix<-makeContrasts(group2-group1,levels=design)
fit2<-contrasts.fit(fit,contrast.matrix)
fit2 <- eBayes(fit2)

> pData(BSL)
sampleID
23 wt 23 wt
24 wt 24 wt
48 wt 48 wt
61 wt 61 wt
71 wt 71 wt
8-Het 8-Het
28-Het 28-Het
54-Het 54-Het
59-Het 59-Het
79-Het 79-Het
87-Het 87-Het

I created my design matrix as below (group1 -wt,group2-het):
group1 group2
1 1 0
2 1 0
3 1 0
4 1 0
5 1 0
6 0 1
7 0 1
8 0 1
9 0 1
10 0 1
11 0 1
attr(,"assign")
[1] 1 1
attr(,"contrasts")
attr(,"contrasts")\$factor(c(1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2))
[1] "contr.treatment"

Contrasts
Levels group2 - group1
group1 -1
group2 1

I'm hoping this is correct, i'd appreciate if someone could give me a bit more understanding. I'm quite confused reading the limma guide.

cheers,
john