Comparisons of comparisons in DESeq2
1
1
Entering edit mode
Iora ▴ 10
@iora-16520
Last seen 5.8 years ago

Hi all,

I have an experiment where two treatment conditions TR1 and TR2 and their respective controls CL1 and CL2.

With the pairwise comparisons, I can find the differences within the respective Treatment conditions compared to their respective controls. I am also doing the pairwise comparisons to find the differences between the controls too. 

However, I would also like to compare the differences between the respective treatments after it is already compared with their respective controls. What I mean here is that I would like the make a final comparison of.(TR1 vs. CL1) vs. (TR2 vs. CL2)

Do the following design and contrast captures this treatment:

trtcontrast <- list(c('TR1','CL1'), c('TR2','CL2') )

res <- results( dds, contrast=trtcontrast , listValues=c(1/2,-1/2), alpha=0.05 )

As I understood, I do not think this is the right way as is it comparing the average of samples (TR1, CL1) and (TR2, CL2).

What would be the right way to do that specific comparison?

Thanks in advance.

deseq2 • 882 views
ADD COMMENT
2
Entering edit mode
@mikelove
Last seen 1 day ago
United States

If you name the variables condition with levels (ctrl, trt) and group with levels (A, B), then you can use a design of ~group + group:condition. This will produce a group A trt vs ctrl effect and a group B trt vs ctrl effect. You pull these out with results(dds, name="...").

Then to contrast the two effects you can use:

results(dds, contrast=list("...", "..."))

where you fill in the ... with the two treatment effects for the two groups.

ADD COMMENT
0
Entering edit mode

Thanks a lot, Michael. I get the idea now and understood what you mean. 

ADD REPLY

Login before adding your answer.

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