Hello
I am conducting a DESeq2 analysis for differential gene expression using paired samples, featuring 2 drug treatments and 3 conditions. I have tried reading the vignettes and workflows but I am still a bit confused and would like a bit of confirmation from more advanced users. Here is my experiment design, including a column for nested individuals to achieve full rank.
individiual | treatment | phenotype | ind.n |
1 | drug1 | condition1 | 1 |
1 | drug2 | condition1 | 1 |
1 | untreated | condition1 | 1 |
2 | drug1 | condition1 | 2 |
2 | drug2 | condition1 | 2 |
2 | untreated | condition1 | 2 |
3 | drug1 | condition2 | 1 |
3 | drug2 | condition2 | 1 |
3 | untreated | condition2 | 1 |
4 | drug1 | control | 1 |
4 | drug2 | control | 1 |
4 | untreated | control | 1 |
5 | drug1 | condition2 | 2 |
5 | drug2 | condition2 | 2 |
5 | untreated | condition2 | 2 |
6 | drug1 | control | 2 |
6 | drug2 | control | 2 |
6 | untreated | control | 2 |
7 | drug1 | condition2 | 3 |
7 | drug2 | condition2 | 3 |
7 | untreated | condition2 | 3 |
8 | drug1 | condition2 | 4 |
8 | drug2 | condition2 | 4 |
8 | untreated | condition2 | 4 |
9 | drug1 | control | 3 |
9 | drug2 | control | 3 |
9 | untreated | control | 3 |
10 | drug1 | condition1 | 3 |
10 | drug2 | condition1 | 3 |
10 | untreated | condition1 | 3 |
11 | drug1 | condition1 | 4 |
11 | drug2 | condition1 | 4 |
11 | untreated | condition1 | 4 |
12 | drug1 | control | 4 |
12 | drug2 | control | 4 |
12 | untreated | control | 4 |
I have set up my dds design according to how the vignette seems to suggest and is as follows:
dds <- DESeqDataSetFromMatrix(countData = data,
colData = meta_data,
design = ~phenotype + phenotype:ind.n + phenotype:treatment)
which generates
> resultsNames(dds) | |||||||||||||
[1] "Intercept" "phenotype_Cond1_vs_Control" "phenotype_Cond2_vs_Control" | |||||||||||||
[4] "phenotypeControl.ind.n2" "phenotypeCond1.ind.n2" "phenotypeCond2.ind.n2" | |||||||||||||
[7] "phenotypeControl.ind.n3" "phenotypeCond1.ind.n3" "phenotypeCond2.ind.n3" | |||||||||||||
[10] "phenotypeControl.ind.n4" "phenotypeCond1.ind.n4" "phenotypeCond2.ind.n4" | |||||||||||||
[13] "phenotypeControl.treatmentdrug1" "phenotypeCond1.treatmentdrug1" "phenotypeCond2.treatmentdrug1" | |||||||||||||
[16] "phenotypeControl.treatmentdrug2" "phenotypeCond1.treatmentdrug2" "phenotypeCond2.treatmentdrug2" |
I would like to ask the following questions from this dataset:
1) Differentially expressed genes in response to treatments in each phenotype (i.e control (drug1 vs untreated), (drug2 vs untreated))
Is this information given by
res<- results(dds, name = "phenotypeControl.treatmentdrug1") Comparing (drug1 vs untreated) within control samples?
2) Then compare whether the treatment responses are different between phenotype (i.e. control (drug1 vs untreated) compared condition1 (drug1 vs untreated)
Is this generated by
res <- results(dds, contrast=list(c("phenotypeControl.treatmentdrug1,phenotypeCond1.treatmentdrug1")))?
3) and finally differentially expressed genes within treatment groups between phenotype (i.e Untreated (control vs condition1 vs condition2)
For this i believe I can't get this information with this setup? I tried keeping only the treatment data i'm looking at e.g. untreated to remove the variable and run a new analysis with
dds <- DESeqDataSetFromMatrix(countData = data,
colData = meta_data,
design = ~phenotype)
I would be grateful if someone could give me some confirmation as to whether my process is correct or if not how to achieve what I need.
Thanks