Question on DESeq2 nested model example
1
0
Entering edit mode
Guido Hooiveld ★ 3.9k
@guido-hooiveld-2020
Last seen 20 hours ago
Wageningen University, Wageningen, the …

I am reading the DESeq2 manual (version of 16 Oct 2015), and have a question on the example used in section 3.12 (“Model matrix not full rank"), specifically on the nested model (3.12.1) that deals with testing group-specific effects of a treatment, while controlling for individual effects. The sample assignment of the nested model is this (copied from the manual to allow better reading of this post):

coldata

> coldata
  grp ind cnd ind.n
1   X   1   A     1
2   X   1   B     1
3   X   2   A     2
4   X   2   B     2
5   Y   3   A     1
6   Y   3   B     1
7   Y   4   A     2
8   Y   4   B     2
>

 

The experimental design is:

design2 <- model.matrix(~ grp + grp:ind.n + grp:cnd)

resulting in this model matrix:

> design2

  (Intercept) grpY grpX:ind.n2 grpY:ind.n2 grpX:cndB grpY:cndB

1           1    0           0           0         0         0

2           1    0           0           0         1         0

3           1    0           1           0         0         0

4           1    0           1           0         1         0

5           1    1           0           0         0         0

6           1    1           0           0         0         1

7           1    1           0           1         0         0

8           1    1           0           1         0         1

 

I understand that the coefficients “grpX:cndB” and “grpY:cndB” represent the effect of condition B vs A in group X resp. Y. Maybe a naive question, but is it is also possible to also extract the differences between the 2 groups? Thus what is the difference between groups X and Y at Condition A (and Condition B)? At first sight I thought this is represented by the 2nd coefficient (grpY), but then I realized this coefficient represents the average of condition A plus B in grpY. Is it thus not possible to make these between-group comparisons using this design?

Thanks,

Guido

deseq2 design matrix • 1.3k views
ADD COMMENT
0
Entering edit mode

After giving my question some more thoughts, I think the difference between group X and Y at condition A is represented by the contrast:

grpY

and the difference between group X and Y at condition B:

(grpY:cndB - grpX:cndB + grpY)

... but please correct me if I am wrong.

 

<< EDIT >> I was wrong; see Michael's reply below.

ADD REPLY
0
Entering edit mode
@mikelove
Last seen 1 day ago
United States

You cannot directly compare X and Y because they do not share the same individuals. The design does not allow for that comparison. How do you know an X vs Y effect from a individual 1+2 vs 3+4 effect?

ADD COMMENT
0
Entering edit mode

Well, I thought along the lines of an "unpaired" comparison between the individuals of grpX and grpY at condition A resp. B, whereas the effects of A and B are compared within both grps controlling for individual ("paired" analyses).

But as said before, I wasn't sure... Thanks!

ADD REPLY

Login before adding your answer.

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