Search
Question: DESeq2 results example
2
gravatar for Aggarwal, Praful
2.5 years ago by
United States
Aggarwal, Praful50 wrote:

Hi,

I am reading through the DESeq2 manual and saw the different examples in the results help page. I have a couple of questions to make sure I am understanding these things properly. I am focused more on "Example 3: two conditions, three sets".

1. If I wanted to compare the set Z effect to that of set X, (instead of the average of X and Y as stated in the example), I think either of the following command should work:

results(dds, contrast=list("setZ","setX"))  or results(dds, contrast=c("set","Z","X"))

and this should capture the effect of Z compared to X irrespective of the condition, correct?

2. If I want to test set Z vs. X effect for conditionB, I could just use the combination of variables and compare "ZB" and "XB", correct? But if I want to do the same using an interaction design, would the command be:

results(dds, contrast=list(c("setZ", "setZ.conditionB"),c("setX", "setX.conditionB")))

3. This is more about just the idea of interacting terms, why does the log2 fold change of some genes change drastically when comparing results from a design with interaction to the results from a design without interaction? For example, if I just look at the main effect for condition then I see certain genes with very different fold change values between the two designs. Is this due to the additive nature of interacting terms, if not then what does such an observation represent?

I have read the manual and several other posts on deseq2 designs and contrasts before posting these questions. I apologize in advance some of these things are redundant questions that have already been answered and I missed them. Any insights on the above questions will be very helpful :)

Thank you,

Praful

ADD COMMENTlink modified 2.4 years ago • written 2.5 years ago by Aggarwal, Praful50
2
gravatar for Michael Love
2.4 years ago by
Michael Love15k
United States
Michael Love15k wrote:

hi Pratful,

Yes to 1 and 2

The LFC changes are due to this detail from ?nbinomWaldTest: "When interaction terms are present, the prior on log fold changes will only be used for the interaction terms". When you combine terms (ZB and XB), the design does not have an interaction term, and so the effects all have shrinkage, whereas in the other analysis you add an interaction term (with shrinkage) to a main effect term (without shrinkage). So in the second analysis the combination does not look moderated because there are large fold changes from the main effects. The two analyses would be the same with betaPrior=FALSE.

Because the design with some effects undergoing shrinkage has caused confusion for a number of users (although potentially useful if your analysis focuses only on the interaction term, and you want to have that term moderated), I have been planning for the next release to by default not use shrinkage at all on designs with interactions. If you want shrunken effects you can use the combined variables approach. Otherwise, in my plan for the next release, the interaction designs will produce the same design matrix as model.matrix (as happens now with betaPrior=FALSE)..

ADD COMMENTlink written 2.4 years ago by Michael Love15k
0
gravatar for Aggarwal, Praful
2.4 years ago by
United States
Aggarwal, Praful50 wrote:

Hi Michael,

Thank you for explaining this. I appreciate the prompt and detailed response.

ADD COMMENTlink written 2.4 years ago by Aggarwal, Praful50
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 224 users visited in the last hour