[BioC] limma contrast matrices
Dejian Zhao
zhaodj at ioz.ac.cn
Fri Apr 25 06:47:28 CEST 2008
Dear all,
I wrote this email to know whether my contrast matrices are
conrrect. Many thanks in advance for any advice.
I have a difficulty in constructing the contrast matrix of factorial
design in limma. In section 8.7 of limma user's guide, a factorial
design is discussed. My experimental design resembles the example
very much except that my arrays are direct two-color arrays.
Therefore the hybridization diagram is a square as follows:
WS-MS
|..|
WU-MU
W: wild type
M: mutant
U: unstimulated
S: stimulated
(The horizontal and vertical lines stand for direct hybridizations,
and the dots in the square have no meanings but to fill the space)
What I'm interested in are exactly the same as those in the example.
1. Which genes respond to stimulation in wild type,
2. Which genes respond to stimulation in mutants,and
3. Which genes respond differently in mutants compared to wild type.
I constructed the contrast matrices (see below in the code and
results) without knowing their validity.
Are they right?
Part of my code and results are as follows:
> sessionInfo()
R version 2.6.2 (2008-02-08)
i386-pc-mingw32
locale:
LC_COLLATE=Chinese_People's Republic of
China.936;LC_CTYPE=Chinese_People's Republic of
China.936;LC_MONETARY=Chinese_People's Republic of
China.936;LC_NUMERIC=C;LC_TIME=Chinese_People's Republic of
China.936
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] statmod_1.3.5 limma_2.12.0
> targets
Cy5 Cy3 FileName
1 WS WU 1.gpr
2 WU WS 2.gpr
3 MS MU 3.gpr
4 MU MS 4.gpr
5 WS MS 5.gpr
6 MS WS 6.gpr
7 WU MU 7.gpr
8 MU WU 8.gpr
> design<-modelMatrix(targets,ref="WU")
Found unique target names:
MS MU WS WU
> design
MS MU WS
[1,] 0 0 1
[2,] 0 0 -1
[3,] 1 -1 0
[4,] -1 1 0
[5,] -1 0 1
[6,] 1 0 -1
[7,] 0 -1 0
[8,] 0 1 0
> contrast.matrix<-makeContrasts("WS-WU"=WS,"MS-MU"=MS-MU,"(MS-MU)-(WS-WU)"=(MS-MU)-WS,levels=design)
> contrast.matrix
Contrasts
Levels WS-WU MS-MU (MS-MU)-(WS-WU)
MS 0 1 1
MU 0 -1 -1
WS 1 0 -1
More information about the Bioconductor
mailing list