Two controls in RNAseq formula for DESeq2
2
0
Entering edit mode
taveluz • 0
@taveluz-12960
Last seen 5.2 years ago
USA

Hello,

I have 5 treatments with 3 biological replicates and 2 technical replicates for each one. My design looks like:

  1. DMEM (Basal condition)
  2. Vehicle (Basal condition + vehicles used for treatments 3-5)
  3. Drug
  4. Insult
  5. drug_insult

    After collapsing the technical reps my sampleTable looks like:

    condition   Replicates  sex
    Drug    1   male
    DMEM    1   male
    drug_insult 1   male
    Insult  1   male
    vehiculo    1   male
    Drug    2   female
    DMEM    2   female
    drug_insult 2   female
    Insult  2   female
    vehiculo    2   female
    Drug    3   female
    DMEM    3   female
    drug_insult 3   female
    Insult  3   female
    vehiculo    3   female

DMEM is the control only for Drug and Vehiculo is the control for treatments 3-5. My question is: how to account for these two controls in the formula for DESeq?

I normally would run

x <- DESeqDataSetFromTximport(tximport_object, sampleTable, ~ sex + condition + sex:condition)
x$condition <- relevel(x$condition, "vehiculo")
dds <- DESeq(x)

And then extract the contrast of interest using results(). For instance, if I want to compare Drug vs DMEM I would run:

res <- results(dds, contrast = c("condition", "drug", "DMEM"))

However, the control for that contrast, as specified with the relevel() call is actually Vehiculo. So, I presume this might be giving me different genes that it would otherwise give me if I had specified DMEM as the control for that contrast with:

x <- DESeqDataSetFromTximport(tximport_object, sampleTable, ~ sex + condition + sex:condition)
x$condition <- relevel(x$condition, "DMEM")
dds <- DESeq(x)

I have also checked other threads (1, 2), from which the closest one is 2, however, it is still not clear for me how could I encode the two controls in my formula. So any help will be appreciated,

Best,

Tain.

> sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Mojave 10.14.6

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib

>packageVersion("DESeq2")
 [1] ‘1.24.0’
deseq2 formula controls design • 2.4k views
ADD COMMENT
0
Entering edit mode
swbarnes2 ★ 1.4k
@swbarnes2-14086
Last seen 2 hours ago
San Diego

Use contrasts to specify what condition should be compared to what. Running DESeq without specifying the contrasts is dangerous, you might not be doing the contrast you think you are. Especially with that design; I'm pretty sure you are not doing the contrast you intend.

ADD COMMENT
0
Entering edit mode

Hello @swbarnes2,

I am already using the results() method to extract the contrast of interest, however, my concern is that I might be comparing, for instance, Drug vs DMEM using as control Vehicle (as this was the first level I specified in the formula) when in reality it must be Tibolone vs DMEM (using DMEM as the first level in the formula). The concern traces back to the vignette:

In order to benefit from the default settings of the package, you should put the variable of interest at the end of the formula and make sure the control level is the first level.

Though I have 2 controls.

Best,

Tain.

ADD REPLY
0
Entering edit mode

Sorry, I misspoke in my answer. But your question is incomplete without saying exactly what comparison you are asking for in results, because the default is going to be to give you the genes which respond differently to treatment between sex, and it's not at all clear to me that that's what you really want.

ADD REPLY
0
Entering edit mode

Thank you for your suggestion. I have updated the question to state my problem more clearly.

ADD REPLY
0
Entering edit mode

Okay, so you observed this:

The key point to remember about designs with interaction terms is that, unlike for a design ~genotype + condition, where the condition effect represents the overall effect controlling for differences due to genotype, by adding genotype:condition, the main condition effect only represents the effect of condition for the reference level of genotype

So you know that your setup is only looking at the difference between Drug and DMEM in the reference sex?

ADD REPLY
0
Entering edit mode

Yes, I noted that. I have no problem extracting the sex-specific differences using the ~group design but instead trying to extract the general (i.e. no sex-specific) results for Drug vs DMEM.

I think that what I am going to do is: 1. change my design to ~ sex + condition set Vehiculo as control, 2. extract all comparisons except the Drug vs DMEM, 3. set DMEM as control and extract the Drug vs DMEM, 4. finally, extract the sex-specific differences by using the design ~group.

Would you advise such approach?

Thank you for your answers.

ADD REPLY
0
Entering edit mode
@mikelove
Last seen 5 hours ago
United States

I'd recommend collaborating with a local statistician here. There is more to discuss beyond how to specify the design in R, that is, what it means to have some samples be controls for other samples, what the biological question of interest is here, and the role of the interaction term with sex. I can provide assistance on the support site around the DESeq2 software, but don't have sufficient time to help with statistical analysis unfortunately.

ADD COMMENT
0
Entering edit mode

Hello Michael,

Thank you very much for your response. I will look further advise on this as I agree this is not a trivial design.

Bests,

Tain.

ADD REPLY

Login before adding your answer.

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