gravatar for bhanu.chandra1

2 hours ago by

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
genotype <- c('C1', 'C2', 'D1','D2', 'T1', 'T2')
condition <- c(rep('Control', 2), rep('Disease', 2), rep('Treatment', 2))
metadata <- data.frame(genotype, condition)
rownames(metadata) <- c('C1', 'C2', 'D1','D2', 'T1', 'T2')

# 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))

Source link