Get specifically DE genes per each condition and Log2FC(B/A) vs Log2FC(C/A) DEseq2
1
0
Entering edit mode
ccortes • 0
@ccortes-13066
Last seen 6.9 years ago

Hi all,

My RNA-seq data come from one genotype with three conditions (A, B and C) made in triplicate. The idea is compare each condition and get the specific differential expressed genes for each condition.

After read the Deseq2 manual and several post I think one possibility is:

dds <- DESeq(dds)
res <- results(dds)
resBvsA <- results(dds, contrast=c("condition","B","A"))
res36vs18 <- results(dds, contrast=c("condition","C","A"))
res36vs24 <- results(dds, contrast=c("condition","C","B"))
# To extract middle point between all groups (genes specifically DE in each time)
results(dds, name="conditionA")
results(dds, name="conditionB")
results(dds, name="conditionC")

Am I correct?

Also I am wondering if is posible compare log2FC(B/A) vs log2FC(C/A). Does someone have suggestions on how to implement this test in DESeq2? 

Thanks in advance,

Christian

 

 

deseq2 • 1.4k views
ADD COMMENT
1
Entering edit mode
@mikelove
Last seen 3 hours ago
United States

hi,

Comparing B/A to C/A is identical to B/C. The A drops out when you divide (B/A) / (C/A).

The code you have is correct for pulling out the comparison of a single condition with a middle point.

But it won't work with the latest version of DESeq2 (v1.16), which reworked how the coefficients are produced by DESeq(). You have to add betaPrior=TRUE when you call DESeq() to produce these type of coefficients now:

dds <- DESeq(dds, betaPrior=TRUE)
res <- results(dds, name="conditionA") 
...
ADD COMMENT
0
Entering edit mode

Hi Michael,

Why does 'betaPrior=TRUE' apply? What is special about these type of coefficients and what exactly is the "comparison of a single condition with a middle point"? I think I have a similar situation in my data.

Thanks,

-R

ADD REPLY
0
Entering edit mode

So, it gets into a difference in how DESeq2 formulates coefficients, and this has changed over time. In the version of DESeq2 that was published in 2014, we used a technique, which I haven't seen elsewhere, which we called "expanded model matrices", this just meant that each level of the factor had its own coefficient in addition to an intercept. And we put a zero-centered prior on the "betas", the coefficients other than the intercept, so they were shrunk toward the intercept point. You can read about this in the DESeq2 paper.

However, the current version of DESeq2 doesn't make coefficients like this. It uses the standard R coefficients which would be: Intecept, B vs A, and C vs A. And you can then contrast any pairs using results(dds, contrast=...). I'm not convinced there is a lot of value in contrasting one level with the "middle", but I wanted to say to the original poster here that it is possible to do the "old style" analysis using the current version of DESeq2 by adding betaPrior=TRUE.

ADD REPLY

Login before adding your answer.

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