Hello,
I have 5 treatments with 3 biological replicates and 2 technical replicates for each one. My design looks like:
- DMEM (Basal condition)
- Vehicle (Basal condition + vehicles used for treatments 3-5)
- Drug
- Insult
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’

