different padj from DESeq2 when using different contrast input format
0
0
Entering edit mode
2.9 years ago
cwwong13 ▴ 40

I noticed that there are multiple ways to get the result table from DESeq2 and I found that the adj pvalues are slightly different when using these methods while the pvalues maintain the same. I would like to know whether this is normal.

I would also like to know whether my understanding of how to use DESeq2 is correct, therefore, I provide some pseudocode here.

Here is the scenario:

I am using 2 by 4 experimental design:

2 Treatment groups (control and treatment)

4 Tissues (A, B, C, and D)

If I would like to get the DEG for tissue B vs A in the control condition:

results(ddsMF, contrast = c("Tissue", "D", "A"))

alternatively, I can also use:

results(ddsMF, contrast = c(0, 0, 0, 1, 0, 0, 0, 0))

given the order of the coefficient is:

"Treatment_treatment_vs_control" "Tissue_B_vs_A" "Tissue_C_vs_A" "Tissue_D_vs_A" "Treatmenttreatment.TissueB" "Treatmenttreatment.TissueC" "Treatmenttreatment.TissueD"

however, the adj pvalues from these two results are slightly different.

I followed the this tutorial

I would like to know whether the following code is correct if I would like to get the comparison between Tissue D and C in the treatment group:

results(ddsMF, contrast = c(0, 0, 0, -1, 1, 0, -1, 1))

It would be nice to also know is there any scenario that we would need to use the intercept? I found that based on the tutorial I mentioned above, we will never call the intercept.

Thank you!

DESeq2 RNA-Seq • 866 views
ADD COMMENT
0
Entering edit mode

I think that contrast = c(0, 0, 0, 1, 0, 0, 0) is equivalent to contrast = c("Tissue", "D", "A"), not contrast = c("Tissue", "B", "A")

ADD REPLY
0
Entering edit mode

Sorry for the typo. I meant to contrasting between tissue D and A. I have edited the original question.

ADD REPLY
0
Entering edit mode

If you have already specified your Tissue group, just use results(ddsMF, contrast = c("Tissue", "D", "C"))

ADD REPLY
0
Entering edit mode

I understood I can just use results(ddsMF, contrast = c("Tissue", "D", "C")) for simple comparison. However, as I also mentioned my the last example in the question, I cannot use similar code to produce the comparison I would like to do and have to use the contrast matrix format. And I found that these two input format seems to provide slightly different results.

ADD REPLY

Login before adding your answer.

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