SEQanswers (
-   Bioinformatics (
-   -   4 conditions in DESeq2 (

mattanswers 01-21-2015 03:39 PM

4 conditions in DESeq2
I have four conditions A, B, C, and D that each have three HTSeq count files.

I want to use DESeq2 to compare A to B, A to C, A to D, B to C, B to D etc.

With DESeq, I would bring all the 12 files into a countDataSet and then I could specify which of the conditions to compare.

With DESeq2, I can bring all the 12 files into a DESeqDataSet, but I can not figure out how to do specify the particular comparisons.

Dario1984 01-21-2015 07:00 PM

It's easy. Use the contrast variable of the results function. Comparing all pairs of contrasts is not a good idea, though. Why don't you have a better biological hypothesis ?

mattanswers 01-21-2015 07:08 PM

We have wild type condition A and wild type condition B as well as treated condition A and treated condition B. So, we would like to see changes in gene expression between condition A and condition B, as well as changes in gene expression between wild type and treated.

Will contrast provide us with this ? To me it seems like the analysis is done by the DESeq function and the results function just organizes the output of the DESeq function.

dpryan 01-21-2015 11:45 PM

Yes, a contrast allows you to perform pretty much any comparison you want. Note that the comparisons to A don't require contrasts, since those are just fit coefficients.

Michael Love 01-22-2015 06:03 AM

hi Matt,

For lots more information about what you want to do, check out the man page for ?results and section 3.2 Contrasts in: vignette("DESeq2")

mattanswers 01-22-2015 11:06 AM

Thank you very much for your answers Dario, Devon and Michael !

Michael Love 01-22-2015 11:11 AM

> "Note that the comparisons to A don't require contrasts, since those are just fit coefficients."

Safest always to use contrast=c("condition","B","A"), because when we have expanded model matrices for symmetric shrinkage, then the coefficients are not B_vs_A, but simply A, B, etc. This will be clear from resultsNames(dds)

mattanswers 01-22-2015 11:15 AM

OK. Thank you for clarifying that.
(And also for making DESeq2 !)

All times are GMT -8. The time now is 11:38 AM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2020, vBulletin Solutions, Inc.