Single model matrix_design formula_RNASeq_DESeq2
1
0
Entering edit mode
@bhanuchandra1-24291
Last seen 3 months ago
United States

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))
deseq2 • 771 views
ADD COMMENT
1
Entering edit mode
@mikelove
Last seen 3 hours ago
United States

Check out the vignette section on multi-factor designs.

ADD COMMENT
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

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

ADD REPLY
1
Entering edit mode

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

ADD REPLY
0
Entering edit mode

Thank you very much, Micheal.

ADD REPLY

Login before adding your answer.

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