Confusion over limma documentation and design/contrast matrix
1
0
Entering edit mode
Assa Yeroslaviz ★ 1.5k
@assa-yeroslaviz-1597
Last seen 4 months ago
Germany
An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/bioconductor/attachments/20060217/ d1fbef65/attachment.pl
• 443 views
ADD COMMENT
0
Entering edit mode
Assa Yeroslaviz ★ 1.5k
@assa-yeroslaviz-1597
Last seen 4 months ago
Germany
An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/bioconductor/attachments/20060217/ 221cd3ef/attachment.pl
ADD COMMENT
0
Entering edit mode
Hi Assa, Assa Yeroslaviz wrote: > Hi, > > I know it's a long time since this mail was written, but i must admit that > it was a good one. At last i can say, that i know how the design matrix in > two-color arrays functions. > Due to the fact that I'm working at the moment with affymetrix chips, i > would like to try and understand how the same calculation is doing here. > > I tried it on the affy example from the user guide. 2 WT and 3 MU > >>design > > WT MUvsWT > Array1 1 0 > Array2 1 0 > Array3 1 1 > Array4 1 1 > Array5 1 1 > I'll try to do it exactly the same as for two-color arrays. > c1 = A (the first two lines) > c1 + c2 = B (the last three lines) > => c2=B-A!!! > what is now B-A? can i write it like that: WT-(WT-MU) or is it WT +(MU-WT)? > How do i write the difference between mutant and wild type? I think you are confusing yourself with all this A and B stuff. If you simply look at the column names of your design matrix, you can see that the second coefficient gives the difference between Mutant and WT (which is why it is labeled MUvsWT). This design is known as a Factor Effects model, and can be confusing because all of the coefficients except the first capture the difference between two factors (as here, where the second coefficient captures the difference between Mu and WT). Because the second coefficient captures the difference between Mu and WT, you don't need a contrasts matrix. Simply extract things with topTable(fit, coef = 2). > > > the second design matrix looks like that: > > WT MU > Array1 1 0 > Array2 1 0 > Array3 0 1 > Array4 0 1 > Array5 0 1 > > here i don't have the connection between the two samples so i need to make > it through the contrast matrix. > this i can make with WT-MU or (1 -1) for B-A. Is it correct? This is a Cell Means model. I find this to be a more intuitive way to set up linear models because each coefficient simply captures the means of each factor level, and you can then use a contrasts matrix to do whatever comparison you desire. The contrasts matrix you indicate will give you WT - Mu, which will be identical to the second coefficient for the Factor Effects model above, except the sign of the coefficients will be reversed. If you want the same sign, you need (-1,1), which is Mu- WT. > > > Another problem is when i want to use more than just one comparison. If I > have for example two different mutants. can i compare both of them the same > way it was done above? > can i make a design matrix like this: > WT MU1 MU2 > Array1 1 0 0 > Array2 1 0 0 > Array3 1 1 0 > Array4 1 1 0 > Array5 1 1 0 > Array6 1 0 1 > Array7 1 0 1 > Array9 1 0 1 > and work with it as normal, only once for coef2 and one for coef3? [B-A and > C-A] Yep, coef2 = MU1vsWT and coef3 = MU2vsWT. > or do i have to build the contrast matrix, if i want to compare more than > two arrays together? You only need a contrasts matrix if you want to compare MU2vsMU3 (0,1,-1). > > If i do want to work with the contrast matrix for this experiment out of a > design matrix as such: > >>design > > WT MU1 MU2 > Array1 1 0 0 > Array2 1 0 0 > Array3 0 1 0 > Array4 0 1 0 > Array5 0 1 0 > Array6 0 0 1 > Array7 0 0 1 > Array9 0 0 1 > > is it correct to build it with > >>contM <- makeContrasts(WTvsMU1= WT-MU1, WTvsMU2=WT-MU2, levels = design) > > to work with such a contrast matrix: > > 1 -1 0 > 1 0 -1 This works as well, although as for your first example, the sign of the coefficients will be reversed as compared to the Factor Effects model. HTH, Jim -- James W. MacDonald Affymetrix and cDNA Microarray Core University of Michigan Cancer Center 1500 E. Medical Center Drive 7410 CCGC Ann Arbor MI 48109 734-647-5623
ADD REPLY

Login before adding your answer.

Traffic: 424 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6