I have two sets of samples, one set being sensitive to a compound treatment, the other resistant. For each group I have patient samples that were left untreated, treated 2h with a compound and 24h with a compound.
I am trying to do resistant vs sensitive comparisons on the data using edgeR. The manual has an example of a comparison both between and within subjects in chapter 3.5 which to me applies 1:1 on my design.
Following the manual, I have set up the following design
design = model.matrix(~resist+resist:sub+resist:treat)
(Intercept) resistY resistN:sub2 resistY:sub2 resistN:sub3 resistY:sub3
1 1 0 0 0 0 0
2 1 0 0 0 0 0
3 1 0 0 0 0 0
4 1 0 1 0 0 0
5 1 0 1 0 0 0
6 1 0 1 0 0 0
7 1 0 0 0 1 0
8 1 0 0 0 1 0
9 1 0 0 0 1 0
10 1 1 0 0 0 0
11 1 1 0 0 0 0
12 1 1 0 0 0 0
13 1 1 0 1 0 0
14 1 1 0 1 0 0
15 1 1 0 1 0 0
16 1 1 0 0 0 1
17 1 1 0 0 0 1
18 1 1 0 0 0 1
resistN:treat24h resistY:treat24h resistN:treat2h resistY:treat2h
1 0 0 0 0
2 0 0 1 0
3 1 0 0 0
4 0 0 0 0
5 0 0 1 0
6 1 0 0 0
7 0 0 0 0
8 0 0 1 0
9 1 0 0 0
10 0 0 0 0
11 0 0 0 1
12 0 1 0 0
13 0 0 0 0
14 0 0 0 1
15 0 1 0 0
16 0 0 0 0
17 0 0 0 1
18 0 1 0 0
Now I understand that with the contrasts c(0,0,0,0,0,0,0,0,-1,1) and c(0,0,0,0,0,0,-1,1,0,0) you can test for differentially expressed genes between resistant and sensitive cells after 2h and 24h treatment, respectively.
What is unclear to me is for example how to test for differentially expressed genes between resistant and sensitive cells in the control?
It cannot be c(0,1,0,0,0,0,0,0,0,0), since that would give me differentially expressed genes between resistant and sensitive cells in any state right?
The only workaround I have come up so far is to relevel the treatment factors and take treat2h as base level in order to be able to have now the control in the contrast in its position. But I tried it and this changes the outcome of the treat24h contrast, so apparently there's something I'm missing.
Does anyone have any experience on that? Any help would be greatly appreciated...
I am trying to do resistant vs sensitive comparisons on the data using edgeR. The manual has an example of a comparison both between and within subjects in chapter 3.5 which to me applies 1:1 on my design.
Following the manual, I have set up the following design
design = model.matrix(~resist+resist:sub+resist:treat)
(Intercept) resistY resistN:sub2 resistY:sub2 resistN:sub3 resistY:sub3
1 1 0 0 0 0 0
2 1 0 0 0 0 0
3 1 0 0 0 0 0
4 1 0 1 0 0 0
5 1 0 1 0 0 0
6 1 0 1 0 0 0
7 1 0 0 0 1 0
8 1 0 0 0 1 0
9 1 0 0 0 1 0
10 1 1 0 0 0 0
11 1 1 0 0 0 0
12 1 1 0 0 0 0
13 1 1 0 1 0 0
14 1 1 0 1 0 0
15 1 1 0 1 0 0
16 1 1 0 0 0 1
17 1 1 0 0 0 1
18 1 1 0 0 0 1
resistN:treat24h resistY:treat24h resistN:treat2h resistY:treat2h
1 0 0 0 0
2 0 0 1 0
3 1 0 0 0
4 0 0 0 0
5 0 0 1 0
6 1 0 0 0
7 0 0 0 0
8 0 0 1 0
9 1 0 0 0
10 0 0 0 0
11 0 0 0 1
12 0 1 0 0
13 0 0 0 0
14 0 0 0 1
15 0 1 0 0
16 0 0 0 0
17 0 0 0 1
18 0 1 0 0
Now I understand that with the contrasts c(0,0,0,0,0,0,0,0,-1,1) and c(0,0,0,0,0,0,-1,1,0,0) you can test for differentially expressed genes between resistant and sensitive cells after 2h and 24h treatment, respectively.
What is unclear to me is for example how to test for differentially expressed genes between resistant and sensitive cells in the control?
It cannot be c(0,1,0,0,0,0,0,0,0,0), since that would give me differentially expressed genes between resistant and sensitive cells in any state right?
The only workaround I have come up so far is to relevel the treatment factors and take treat2h as base level in order to be able to have now the control in the contrast in its position. But I tried it and this changes the outcome of the treat24h contrast, so apparently there's something I'm missing.
Does anyone have any experience on that? Any help would be greatly appreciated...
Comment