[BioC] help with design matrix

Gordon K Smyth smyth at wehi.EDU.AU
Mon Oct 18 12:44:49 CEST 2004

> Date: Mon, 18 Oct 2004 15:46:38 +1000
> From: maria kamarinos <mariakamarinos at gmail.com>
> Subject: [BioC] help with design matrix
> To: bioconductor at stat.math.ethz.ch
> Dear All
> I am working through the Apo1 example from the LIMMA users guide and
> adapting it to my data but am having some trouble with the design
> matrix and final data interpretation. I have the following
> experimental set up with my goal being to identify which genes are
> differentially expressed between test condition 1 and test condition
> 2.
> array#76…..test1(Cy3) vs reference(cy5)
> array#74…..test2(Cy3) vs reference(cy5)
> array#80…..reference(Cy3) vs test1(cy5)
> array#73…reference(Cy3) vs test2(Cy5)
> I have read in my four GenePix files and gal file and normalized using
> the print-tip lowess algorithm with no problems. I am using the
> following targets file:
> SlideNumber	        FileName	Cy3	Cy5
> 76	        slide76.gpr	test1	reference
> 74	        slide74.gpr	test2	reference
> 80	        slide80.gpr	reference	test1
> 73	        slide73.gpr	reference	test2
> The following design matrix has been generated using the above targets
> file and designMatrix()
>                test1     test2
> slide76     1      0
> slide74     1     -1
> slide80    -1      0
> slide73    -1     -1
> Is this design matrix appropriate if I am interested in comparing
> test1 to test2?

Yes, the 2nd coefficient estimates the test2-test1 comparison.

It would be helpful to give the designMatrix() command that you used.  I am guessing that you've used

design <- designMatrix(targets, ref="test1")

However the column headings are not right, so I'm guessing that you've reset them.

> If I was to use this design matrix (assuming I do not need a contrast
> matrix) and perform empirical bayes statistical analysis on the data
> to generate M values would negative M values that I get from toptable
> (coef =2) indicate genes that are down regulated in test condition 2
> and positive Ms those that are up regulated?

Yes.  You need

fit <- eBayes(lmFit(MA, design))
topTable(fit, coef=2, adjust="fdr")


> Thanks for your help
> Maria Kamarinos

More information about the Bioconductor mailing list