Mixed conditions: Design and contrast matrix
2
0
Entering edit mode
Patrick • 0
@patrick-14498
Last seen 2.2 years ago

Hello,

I performed a RNAseq experiment from microbial cultivations in order to investigate carbon catabolite repression.

I used 2 different strains: A and B

in 2 different media conditions and in a Mix of these conditions: x, y and xy

Experiments were performed in triplicates. Here is the experimental setup:

         strain condition

[1,] "A"    "x"   
[2,] "A"    "x"   
[3,] "A"    "x"   
[4,] "A"    "y"   
[5,] "A"    "y"   
[6,] "A"    "y"   
[7,] "A"    "xy"  
[8,] "A"    "xy"  
[9,] "A"    "xy"  
[10,] "B"    "x"   
[11,] "B"    "x"   
[12,] "B"    "x"   
[13,] "B"    "y"   
[14,] "B"    "y"   
[15,] "B"    "y"   
[16,] "B"    "xy"  
[17,] "B"    "xy"  
[18,] "B"    "xy"

Now iam trying to setup a model matrix.

Since I dont know if the media conditions have the same effect on the two strains, I want to include an interaction term strain:condition.

Now Iam not sure how to set a proper model which also takes the "Mixed" property of "xy" into account.

Should i treat it like a third condition (like "z") ?

If I would only have condition "x" and "y", I would set up the modelmatrix like this:

strain <- factor(c("A", "A", "A", "A", "A", "A", "B", "B", "B", "B", "B", "B"))

condition <- factor(c("x", "x", "x", "y", "y", "y", "x", "x", "x", "y", "y", "y"))

design <- model.matrix( ~ strain + condition + strain:condition)

> design

   (Intercept) strainB conditiony strainB:conditiony
1            1       0          0                  0
2            1       0          0                  0
3            1       0          0                  0
4            1       0          1                  0
5            1       0          1                  0
6            1       0          1                  0
7            1       1          0                  0
8            1       1          0                  0
9            1       1          0                  0
10           1       1          1                  1
11           1       1          1                  1
12           1       1          1                  1
attr(,"assign")
[1] 0 1 2 3
attr(,"contrasts")
attr(,"contrasts")$strain
[1] "contr.treatment"

attr(,"contrasts")$condition
[1] "contr.treatment"

 

If you have any suggestions I would be very happy.

Best
 

limma model.matrix • 646 views
ADD COMMENT
1
Entering edit mode
@ryan-c-thompson-5618
Last seen 15 months ago
Scripps Research, La Jolla, CA

If you believe that the effects of the two conditions x and y should be independent and additive, then you would want to model them separately by splitting the condition factor into an x factor and a y factor. However, the more likely scenario is that the effect of the xy condition is not simply the sum of x and y. So it's probably best to simply model condition as a factor with 3 levels: x, y, and xy.

Now, since you want an interaction between strain and condition, and you likely want to test a number of different interaction coefficients, you might as well combine the two into a single factor with 6 levels, and use the no-intercept design to get a coefficient for each group mean:

group <- interaction(strain, condition, sep=".")
design <- model.matrix(~0 + group)

Then use makeContrasts to define the tests you want to perform in terms of the group means.

ADD COMMENT
0
Entering edit mode
Patrick • 0
@patrick-14498
Last seen 2.2 years ago

Sorry for the weird code formatting. But I get an error message all the time..

ADD COMMENT

Login before adding your answer.

Traffic: 269 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