[BioC] some help for Limma Factorial design for two color data.

Adrian Johnson oriolebaltimore at gmail.com
Sat Nov 1 00:12:13 CET 2008


Dear Prof. Smyth and experts,

I am writing to you as a final option, after not finding an
appropriate answer in BioC mailing list, internet and online
tutorials.
Although the documentation is the 'best reference',  one particular
piece is missing in the documentation may be due to its complexity.
That is factorial design of a two-color microarray data.

We are using mouse agilent chips for identifying effect of a drug on a
mutant vs. normal mouse strain. We used dye-swap for some chips.  The
target files looks like this:
> targets
   Array Cy3 Cy5 Treatment Shock
1 Array1  WT  MU         Y     H
2 Array2  WT  MU         N     C
3 Array3  WT  MU         Y     H
4 Array4  MU  WT         N     C
5 Array5  WT  MU         Y     C
6 Array6  WT  MU         Y     C

The aim of the experiment is to find differentially expressed genes
between MU and WT and importantly find genes differing between
MU.Treated(Y) and MU.Untreated(N).
Similarly MU.Heathshock - MU.Noheatshock(C).

Since affy based estrogen data example is highlited in the
documentation, I am not sure if the following code is correct or
writing a design for this design is more complex that what I have
attempted below.

Method 1:
--------------

>TS <- paste(targets$Cy5,targets$Cy3,targets$Treatment,sep='.')

> TS <- factor(TS,levels=c("MU.WT.Y","MU.WT.N","MU.WT.Y","WT.MU.N","MU.WT.Y","MU.WT.Y"))

> TS
[1] MU.WT.Y MU.WT.N MU.WT.Y WT.MU.N MU.WT.Y MU.WT.Y
Levels: MU.WT.Y MU.WT.N MU.WT.Y WT.MU.N MU.WT.Y MU.WT.Y

> design <- model.matrix(~0+TS,ref='WT')

> colnames(design) <- levels(TS)

> design
  MU.WT.Y MU.WT.N MU.WT.Y WT.MU.N MU.WT.Y MU.WT.Y
1       1       0       0       0       0       0
2       0       1       0       0       0       0
3       1       0       0       0       0       0
4       0       0       0       1       0       0
5       1       0       0       0       0       0
6       1       0       0       0       0       0
attr(,"assign")
[1] 1 1 1 1 1 1
attr(,"contrasts")
attr(,"contrasts")$TS
[1] "contr.treatment"

I am not sure by this method, LiMMA understands dye-swam chips.

Method 2:
--------------
Instead, I created a matrix like the following
> mm1 <- read.table('model_matrix1.txt',sep='\t',header=TRUE,stringsAsFactor=FALSE)
> mm1 <- as.matrix(mm1)
> mm1
     Mu.T Mu.NT
[1,]    1     0
[2,]    0     1
[3,]    1     0
[4,]    0    -1
[5,]    1     0
[6,]    1     0
> myFit <- lmFit(MA,mm1)
> myFit <- eBayes(myfit)

# here Mu.NT is Mutant no treatment.
method 2 when tried on my data, it works, and I get differentially
expressed genes but I am not sure if those genes are correct.

Which one of these methods is correct. I am not sure. If both are
wrong, how can I do this correctly. Please help me.
thank you.
Adrian.



More information about the Bioconductor mailing list