Question: Comparison of Comparisons with DESeq2
0
gravatar for dbretta25
6 days ago by
dbretta250
dbretta250 wrote:

I have an experimental design with 4 groups, 6 replicates per group (1 control group "A", and 3 treatment groups "B", "C", and "D").

My design is ~ condition

My code is as follows:

dds <- DESeqDataSetFromMatrix(countData=my.counts, colData=coldata, design= ~ condition)
dds <- estimateSizeFactors(dds)
dds <- DESeq(dds)
resultsNames(dds)
[1] "Intercept" "gr_B_vs_A" "gr_C_vs_A" "gr_D_vs_A"

I am not sure how to define some of my comparisons of interest, primarily the comparison of comparisons:

(D - C) - (B - A)

Is it possible to define this contrast from the resultsNames above?

As an aside, I attempted to use the resultsNames to perform one comparison (D - C) in two ways: Once by specifying the "contrast" parameter of the results function like so:

res <- results(dds, contrast=c("condition", "D", "C"))

And again by utilizing the resultsNames like so:

res <- results(dds, contrast=list(c("gr_D_vs_A","gr_C_vs_A"))

I was thinking that they should be equivalent due to (D - A) - (C - A) = D - C, but I obtain different numbers of significant DE Genes from these two methods so it seems like my thinking is incorrect.

I am using DESeq2 version 1.22.2

Thanks for your help,

Brett

ADD COMMENTlink modified 6 days ago by Michael Love23k • written 6 days ago by dbretta250
Answer: Comparison of Comparisons with DESeq2
0
gravatar for Michael Love
6 days ago by
Michael Love23k
United States
Michael Love23k wrote:

There’s a whole section of the DESeq2 vignette on “interactions”, take a look there first.

ADD COMMENTlink written 6 days ago by Michael Love23k

Thanks Michael,

I have read the interaction section of the vignette but I am having trouble taking that information/example and applying it to my design.

Do you have input on whether the two results examples I provided are two ways of performing the same contrast (D - C)? And if they should then have identical results in terms of DE Genes passing an adjusted pvalue cutoff?

ADD REPLYlink written 6 days ago by dbretta250

You should make two new factors, say X and Y,

Such that:

X=0 and Y=0 => condition A

...

X=1 and Y=1 => condition D

Then test the X:Y interaction term.

ADD REPLYlink modified 6 days ago • written 6 days ago by Michael Love23k
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 16.09
Traffic: 243 users visited in the last hour