Hello Upendra

I have a similar question about setting up the model matrix in edgeR for performing anova-like analysis. Since I am new to computing in general, I don't entirely understand the codes.

Experimental setup: I have two mammalian cell lines (Lets say) A, B. RNA-Seq analysis was done on these two cell lines at different concentrations of serum: 10%, 5% and 0%. Only cell line A was present in all three conditions (10,5,0) but cell line B is present in only 10% and 5%.

I want to do an anova analysis across the two cell lines in all conditions. Could you please verify the way I have setup the model matrix? My code is below.

##Creating the DGE List

**> group<-c(rep("P_10",2), rep("P_05",2), rep("P_00",2), rep("H_10",2), rep("H_05",2))**

**> cds<-DGEList(counts, group=group)**

# Calculating Normalization factors

**> cds<-calcNormFactors(cds)**

#MDS Plot

**> plotMDS(cds,main='MDS plot for count data', labels=colnames(cds$counts))**

**> cds<-estimateCommonDisp(cds)**

**> cds<-estimateTagwiseDisp(cds,prior.df = 10)**

#model matrix code

**> design<-model.matrix(~0+group, data=cds$samples)**

**#**Anova like analysis code

**> cds<-estimateGLMCommonDisp(cds,design)**

**> cds<-estimateGLMTrendedDisp(cds,design)**

**Loading required package: splines**

**> cds<-estimateGLMTagwiseDisp(cds,design)**

**> fit2<-glmFit(cds,design)**

**> lrt.anova_like<-glmLRT(fit2,coef=2:5)**

**Thank You**

I will answer myself. This should be the set-up for design matrix

design <- model.matrix(~gt+tis * trt)

350