This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Deseq2 Pairwise Comparison Between Conditions

Hi,

In DESeq(1) it was possible to compare between conditions like this:

res = nbinomTest( cds, "1", "5" )

Where 1 and 5 are were the conditions I wished to compare (and in total there were 6 conditions).

I have just started using DESeq2 but I cannot work out how to replicate this analysis.

I tried "res <- results(cds,"1","5")" but that doesn't work. Does using the follow specify what is being compared?

colDATA(cuffcdsnorepdeseq2)$condition <- factor(colData(cuffcdsnorepdeseq2)$condition,levels=c("1","5"))

The problem is when I use this and then "res <- results(cds)" I am unsure about exactly what is being compared.

How can I do a pariwise comparison in DESeq2?

Thanks,

Jon.

deseq differential expression

1 answer

You'll want to use the contrasts= part of the results() functions. So something like:

res <- results(cds, contrasts=c("conditions","firstCondition","fifthCondition"))

This way, you can be confident in which comparisons you're making. I recall reading that the contrasts functionality is relatively new, so you may need to update if you haven't already done so recently.

Update: In fact it appears that the contrasts functionality is new in what is currently the devel branch (Bioconductor 2.13).

Log in to answer this question.