Help understanding the contrast function in DESeq2
1
0
Entering edit mode
@eric-de-sousa-22678
Last seen 4.3 years ago

I have an experiment with 4 different conditions.

My idea was to use the contrast function to make the comparisons between the conditions but some comparisons don't seem to have have any DE genes.

Since this was disappointing I wanted to make sure I was using the contrast function properly so this time I only imported the data from 2 conditions instead of 4. And I compared res <- results(dds) with res2 <- results(dds, contrast=c("condition","A","B")).

Shouldn't the results from res and res2 be the same in this situation? But they are not.

Thanks for your help.

deseq2 • 1.4k views
ADD COMMENT
1
Entering edit mode
@fischer-philipp-18490
Last seen 23 months ago
Austria

What does head(res) and head(res2) return? One is able to see log2 fold change (MLE): A vs B in both, res and res2.
Probably your conditions are not named Aand Bso as reference label another variable is beeing used.

To make sure to use the suiting reference label use something like this: dds$condition <- relevel(dds$condition, ref = "B")

ADD COMMENT
0
Entering edit mode

By checking head(res) and head(res2) I was able to figure out that I made a mistake in the design matrix.

Now that I've fixed that the results of res <- results(dds) and res2 <- results(dds, contrast=c("condition","A","B")) match up.

Thanks!

ADD REPLY

Login before adding your answer.

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