[BioC] Complex contrasts for between and within subject comparisons

Tobias Neumann [guest] guest at bioconductor.org
Fri Jul 11 16:40:57 CEST 2014


I have a question regarding the presented comparison both between and within subjects in chapter 3.5 of the edgeR users guide:

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, so patient is clearly a blocking factor. This gives me 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 can’t 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.

What is the proper way to do this?

 -- output of sessionInfo(): 

Not needed since conceptual question

--
Sent via the guest posting facility at bioconductor.org.



More information about the Bioconductor mailing list