Hi, I am new to RNASeq and DESeq2 and I am trying to do the analysis. My experiment has three groups (Control: X-overexpression= Disease: X+Y-overexpression= Treatment) with two samples in each. I did DESeq2 with RNASeq data to find the differential expression between two groups (pair-wise comparison: Disease vs. Control and Treatment vs. Disease). I have provided the code. However, I have been suggested to use a single model matrix (y ~ Disease+Treatment) to simultaneously evaluate the effect of X-overexpression and X+Y-overexpression using all samples. Genes with β(X) <> 0 are X-induced dysregulated genes. Genes with β(X+Y) <> 0 and has an opposite sign of β(X) are Y-rescued genes. I do not understand what is "single model matrix". I will be thankful if anyone directs me on this.

```
# setting the metadata for the samples
sample <- c('C1', 'C2', 'D1','D2', 'T1', 'T2')
condition <- c(rep('Control', 2), rep('Disease', 2), rep('Treatment', 2))
metadata <- data.frame(sample, condition)
metadata <- column_to_rownames(metadata, 'sample')
# sample order
all(colnames(file) == rownames(metadata)
# Create DESeqDataSet object
dds <- DESeqDataSetFromMatrix(countData = file,
colData = metadata,
design = ~condition)
# Differential Expression Analysis
dds <- DESeq(dds)
# Building the results table
(res_A_W <- results(dds,
contrast = c('condition', 'Disease', 'Control'),
alpha = 0.05))
(res_AT_A <- results(dds,
contrast = c('condition', 'Treatment', 'Disease'),
alpha = 0.05))
```

Hi Micheal, I went through the "multi-factor designs" section. I think it requires two variables (~type+condition) where each level of variable 1 has every level of variable 2. However, my design has only one variable (Genotype and condition are the same, I have edited the code). My treatments, X (Disease) and X+Y (treatment) are the levels of condition variable but not as variables itself to use in the design formula. I will be thankful if you let me know if my understanding is correct. Regards Bhanu

It sounds like you have a three groups that can be represented by one factor. You could just use ~condition and then use the

`contrast`

argument in results() to make comparisons as you like.Yes, I have 3 groups (control, disease, and treatment) where all fall under the condition/genotype factor. I did similarly as you suggested, but I have been suggested to use a "single model matrix" (y ~ Disease+Treatment). If I know what is a "single model matrix", I can defend my self of what I did. I will be thankful if you can guide me to any link where I can read about the "single model matrix". Regards, Bhanu

I’m not sure what that is referring to but you’ve instead got my recommendation. Good luck!

Thank you very much, Micheal.