Dear all,

I have the following target

target

filename mutation exp
sample1.cel   wt     1
sample2.cel   wt     1
sample3.cel  mu     1
sample4.cel  mu     1
sample5.cel   wt     2
sample6.cel   mu     2
sample7.cel  mu     2
sample8.cel  mu     2


I'm intersting in mu vs wt, but taking into account the exp factor (which
seems
having most impact on signal as reveal by a PCA : PC1 seems to be assoiated
to exp)


So I've set the following design so as to model the resulting signal as a
combination of these two factor:

design = matrix(0, ncol=4, nrow = 8)
design[which(target$mutation == "wt"),1] = 1
design[which(target$mutation == "mu"),2] = 1
design[which(target$exp == 1),3] = 1
design[which(target$exp == 2),4] = 1
colnames(design) = c("wt","mu","exp1","exp2")


design
     wt mu exp1 exp2
[1,]  1  0    1    0
[2,]  1  0    1    0
[3,]  0  1    1    0
[4,]  0  1    1    0
[5,]  1  0    0    1
[6,]  0  1    0    1
[7,]  0  1    0    1
[8,]  0  1    0    1

fit = lmFit(x, design)
but it failed (even before doinf any contrast matrix), raising the
following error :
Coefficients not estimable: exp2

Can you please tell me what is wrong is such design ?


SO I've used the approach described in Limma User guide :
f <- paste(target$mutation,target$exp,sep="")
f <- factor(f)
[1] wt1 wt1 mu1 mu1 wt2 mu2 mu2 mu2
Levels: mu1 mu2 wt1 wt2


design <- model.matrix(~0+f)
colnames(design) <- levels(f)
design

  mu1 mu2 wt1 wt2
1   0   0   1   0
2   0   0   1   0
3   1   0   0   0
4   1   0   0   0
5   0   0   0   1
6   0   1   0   0
7   0   1   0   0
8   0   1   0   0
attr(,"assign")
[1] 1 1 1 1
attr(,"contrasts")
attr(,"contrasts")$f
[1] "contr.treatment"

using such a design matrix, can I use correctly the following contrast
matrix to get the gene differentially expressed between mutant and wild
type ?
cont.matrix <- makeContrasts(mu_vs_wt = (mu2+mu1) - (wt2+wt1),levels=design)


many thanks for you answer.

==
Dave Canvhet

	[[alternative HTML version deleted]]

