design of edgeR GLM test
4
0
Entering edit mode
@simarsidhu25-12016
Last seen 7.8 years ago

When I am applying these two different designs in edgeR GLM test it gives different results:

design<-model.matrix(~0+treatment:group+group:plant,data=y$samples)
design <- model.matrix(~0+group+group:plant+treatment:group,data=y$samples)

even the groups are same like:

treatmentD:groupR vs treatmentD:groupS

Can anyone help me why it happens?

edger differential gene expression glmlrt() • 1.3k views
ADD COMMENT
1
Entering edit mode
@james-w-macdonald-5106
Last seen 1 day ago
United States

Whenever you define a model, you are implying that the things on the right hand of the equation explain something about the observed values on the left hand side. Or, put another way, you are saying that you think that changes in the expression of a gene can be explained by inherent differences between various known attributes of the things that you measured (e.g., what group it was, what the treatment was, etc).

In the first model you describe, you are saying that group membership doesn't mean anything, or alternatively, that you assume that the gene expression for all the groups should be roughly the same, and the only differences are due to interactions between the treatment and group as well as the group and plant type. In the second model you are saying you expect that the relative expression between groups may change, plus there might be the interactions we already mentioned.

When you fit the model, the goal is to partition the observed variability into the different 'buckets' you have defined in your model, in some optimal way. In other words, in the second model, you try to estimate the overall gene expression that is due to being in one group or another. In the first model you don't do that at all, and instead any group-specific variability gets subsumed into the two interaction terms, or into the error term.

Which is a long winded way of saying that specifying a different model will result in different results, because you know, you specified a different model.

ADD COMMENT
0
Entering edit mode
@simarsidhu25-12016
Last seen 7.8 years ago

Thank you very much.

ADD COMMENT
0
Entering edit mode
@simarsidhu25-12016
Last seen 7.8 years ago

I have one another question. Like, when I am using the 2nd design then I am getting same genes with opposite expression in different treatment.

For example, I have two groups R and S as well as two treatments M and V. when I am checking for groupR:treatmentM vs groupS:treatmentM and groupR:treatmentV vs groupS:treatmentV then I am getting the same DE genes with opposite expression.

-1  258
0  41589
1   119

and

-1  119
0  41589
1   258

Can anyone tell me why it is like this?

ADD COMMENT
0
Entering edit mode

Creating the right design and contrast can be tricky with multiple factors interacting with each other.

Read through the edgeR and limma user guides and look for the sections that explain how to reparameterize these as a one-way layout (for instance, section 4.4.6 of this edgeRUsersGuide). Constructing the contrasts will be more intuitive for you.

Basically you will create a new "group" factor which will be group <- paste(treatment, group, plant, sep="_"), then setup your design with no intercept a la design <- ~ 0 + group, then create the contrasts of interests by adding up the groups you want in the numerator, and dividing by the sum of the groups you want in the denominator.

Also, I have no idea of your design, but do you really want "plant" in there? Do you have multiple samples from different parts of the same plant, or something?

ADD REPLY
0
Entering edit mode

Plant is having the group of different plants/lines. Each line has two forms treated and control.

ADD REPLY
0
Entering edit mode
@simarsidhu25-12016
Last seen 7.8 years ago

Actually, I want to compare both between and within subjects. I am following section 3.5 of this edgeRUsersGuide and I am using

design <- model.matrix(~0+group+group:plant+treatment:group,data=y$samples)

 But I am getting the same DE genes with opposite expression for groupR:treatmentM and groupS:treatmentM.

Please help me where I am wrong?

ADD COMMENT

Login before adding your answer.

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