Hi all,
I have what may seem like as really simple questions, but being new to using R in general and very new to DEseq2 I just can not figure it out reading the manual (which is great and very informative for a biologist, thanks!)
I have a simple design of 3 donors (A, B and C) and 3 conditions (unit,eth and vitd).
My basic question is how can I do a contrast with a multifactorial design? (IU may be getting these terms mixed up and therein may lie the problem.
If I simply import the "eth" and "vitd" data and follow the manual for MF design I can run through and get great results (with 85 DE genes):
> dds <- DESeqDataSetFromMatrix(countData = cts, colData = coldata, design = ~ condition)
> dds <- dds[ rowSums(counts(dds)) > 1, ]
> ddsMF <- dds
> design(ddsMF) <- formula(~ donor + condition)
> ddsMF <- DESeq(ddsMF)
etcetc
However when I try and do the same thing but also importing the "uns" sample (so now I have "uns", and the two previous "eth" + "vitd") and try and follow the contrast I get 75 DE genes. So same procedure as before but this time
> res.vitd.eth <- vitdresults(ddsMF, contrast=c("condition","vitd","eth"))
with the ddsMF run as before.
I'm sure I am doing something so basic wrongs here.
Thank you in advance,
Reuben
Thank you Gavin,
I see your points, both of them. I am using the most recent DESeq2 version, sorry I should have specified version etc.
However, as far as I can gather, there is something wrong with my design, please bare with me.
when I run the original:
> dds <- DESeqDataSetFromMatrix(countData = cts, colData = coldata, design = ~ condition)
So there is no multifactorial design, so no controlling for donor variability, I also get 75DE genes.
The same 75 when I run the contrast:
> res.vitd.eth <- vitdresults(ddsMF, contrast=c("condition","vitd","eth")).
However when I run the original multifactorial design:
> design(ddsMF) <- formula(~ donor + condition)
This seems to work well and control for donor variability, and hence bring uptake few extra DE genes (all the 75DE genes in the non MF design are also in the 85DE of the MF design plus an extra 10, as you mentioned at the start of your answer, i.e. the content of the gene lists are very similar).
So it seems the contrast (res.vitd.eth <- vitdresults(ddsMF, contrast=c("condition","vitd","eth") I am running is not controlling for donor variability, even though I am using ddsMF, which was run with the formula donor + condition:
> design(ddsMF) <- formula(~ donor + condition)
> ddsMF <- DESeq(ddsMF)
Thank you again for your answer,
p.s. I will speak to our statistician (they are pretty hard to get an appointment with), but I have evert condition for each donor.