Deseq2 Pairwise Comparison Between Conditions
1
2
Entering edit mode
10.6 years ago
jomaco ▴ 200

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 • 10k views
ADD COMMENT
3
Entering edit mode
10.6 years ago

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

ADD COMMENT

Login before adding your answer.

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