This is a test version of Biostars. For the public version, visit https://www.biostars.org.
different padj from DESeq2 when using different contrast input format

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

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")

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

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

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.

0 answers

No answers yet.

Log in to answer this question.