> rnaseqMatrix0= read.table("transcript_count_matrix.csv",header=T,sep=",")

> > col_ordering = c(21,22,5,6)#0h
rnaseqMatrix =rnaseqMatrix0[,col_ordering];rnaseqMatrix = rnaseqMatrix[rowSums(rnaseqMatrix)>=2,];conditions = factor(c("WT","WT","KO","KO"));
exp_study = DGEList(counts=rnaseqMatrix, group=conditions);exp_study = calcNormFactors(exp_study);exp_study = estimateCommonDisp(exp_study);exp_study = estimateTagwiseDisp(exp_study);et = exactTest(exp_study)
tTags = topTags(et,n=NULL,adjust.method = "fdr")
#r <- rownames(topTags(et)$table)
r <- rownames(tTags)
c=cpm(exp_study)[r, order(exp_study$samples$group)]
x=cbind(as.data.frame(tTags),c)
summary(de <- decideTestsDGE(et, p=0.05))
#detags <- rownames(exp_study)[as.logical(de)]
#plotSmear(et, de.tags=detags)
#abline(h = c(-1, 1), col = "blue")
#write.table(tTags, file="edgeRtranscripts-0h.csv")
write.table(x, file="edgeRtranscriptsExpr-0h.csv")

>    [,1] 
-1    40
0  19779
1     32
> > > > > > > colnames(rnaseqMatrix)
[1] "WT_0h_replicate_I"   "WT_0h_replicate_II_" "KO_0h_replicate_I"  
[4] "KO_0h_replicate_II" 
> col_ordering = c(23,24,7,8)#2h
rnaseqMatrix =rnaseqMatrix0[,col_ordering];rnaseqMatrix = rnaseqMatrix[rowSums(rnaseqMatrix)>=2,];conditions = factor(c("WT","WT","KO","KO"));
exp_study = DGEList(counts=rnaseqMatrix, group=conditions);exp_study = calcNormFactors(exp_study);exp_study = estimateCommonDisp(exp_study);exp_study = estimateTagwiseDisp(exp_study);et = exactTest(exp_study)
tTags = topTags(et,n=NULL,adjust.method = "fdr")
r <- rownames(tTags)
c=cpm(exp_study)[r, order(exp_study$samples$group)]
x=cbind(as.data.frame(tTags),c)
summary(de <- decideTestsDGE(et, p=0.05))
#write.table(tTags, file="edgeRtranscripts-2h.csv")
write.table(x, file="edgeRtranscriptsExpr-2h.csv")

>    [,1] 
-1     8
0  17885
1      6
> > > > colnames(rnaseqMatrix)
[1] "WT_2h_replicate_I"  "WT_2h_replicate_II" "KO_2h_replicate_I" 
[4] "KO_2h_replicate_II"
> col_ordering = c(25,26,9,10)#6h
rnaseqMatrix =rnaseqMatrix0[,col_ordering];rnaseqMatrix = rnaseqMatrix[rowSums(rnaseqMatrix)>=2,];conditions = factor(c("WT","WT","KO","KO"));
exp_study = DGEList(counts=rnaseqMatrix, group=conditions);exp_study = calcNormFactors(exp_study);exp_study = estimateCommonDisp(exp_study);exp_study = estimateTagwiseDisp(exp_study);et = exactTest(exp_study)
tTags = topTags(et,n=NULL,adjust.method = "fdr")
r <- rownames(tTags)
c=cpm(exp_study)[r, order(exp_study$samples$group)]
x=cbind(as.data.frame(tTags),c)
summary(de <- decideTestsDGE(et, p=0.05))
#write.table(tTags, file="edgeRtranscripts-6h.csv")
write.table(x, file="edgeRtranscriptsExpr-6h.csv")

> > > > > > >    [,1] 
-1    42
0  18589
1     27
> > > > colnames(rnaseqMatrix)
[1] "WT_6h_replicate_I"  "WT_6h_replicate_II" "KO_6h_replicate_I" 
[4] "KO_6h_replicate_II"
> col_ordering = c(27,28,11,12)#IFN
rnaseqMatrix =rnaseqMatrix0[,col_ordering];rnaseqMatrix = rnaseqMatrix[rowSums(rnaseqMatrix)>=2,];conditions = factor(c("WT","WT","KO","KO"));
exp_study = DGEList(counts=rnaseqMatrix, group=conditions);exp_study = calcNormFactors(exp_study);exp_study = estimateCommonDisp(exp_study);exp_study = estimateTagwiseDisp(exp_study);et = exactTest(exp_study)
tTags = topTags(et,n=NULL,adjust.method = "fdr")
r <- rownames(tTags)
c=cpm(exp_study)[r, order(exp_study$samples$group)]
x=cbind(as.data.frame(tTags),c)
summary(de <- decideTestsDGE(et, p=0.05))
#write.table(tTags, file="edgeRtranscripts-IFN.csv")
write.table(x, file="edgeRtranscriptsExpr-IFN.csv")

> > > > > > >    [,1] 
-1    48
0  19634
1     36
> > > > colnames(rnaseqMatrix)
[1] "WT_IFN.gamma_replicate_I"  "WT_IFN.gamma_replicate_II"
[3] "KO_IFN.gamma_replicate_I"  "KO_IFN.gamma_replicate_II"
> col_ordering = c(29,30,13,14)#IL4
rnaseqMatrix =rnaseqMatrix0[,col_ordering];rnaseqMatrix = rnaseqMatrix[rowSums(rnaseqMatrix)>=2,];conditions = factor(c("WT","WT","KO","KO"));
exp_study = DGEList(counts=rnaseqMatrix, group=conditions);exp_study = calcNormFactors(exp_study);exp_study = estimateCommonDisp(exp_study);exp_study = estimateTagwiseDisp(exp_study);et = exactTest(exp_study)
tTags = topTags(et,n=NULL,adjust.method = "fdr")
r <- rownames(tTags)
c=cpm(exp_study)[r, order(exp_study$samples$group)]
x=cbind(as.data.frame(tTags),c)
summary(de <- decideTestsDGE(et, p=0.05))
#write.table(tTags, file="edgeRtranscripts-IL4.csv")
write.table(x, file="edgeRtranscriptsExpr-IL4.csv")

> > > > > > >    [,1] 
-1    32
0  18987
1     40
> > > > colnames(rnaseqMatrix)
[1] "WT_IL4_replicate_I"  "WT_IL4_replicate_II" "KO_IL4_replicate_I" 
[4] "KO_IL4_replicate_II"
> col_ordering = c(31,32,15,16)#0h
rnaseqMatrix =rnaseqMatrix0[,col_ordering];rnaseqMatrix = rnaseqMatrix[rowSums(rnaseqMatrix)>=2,];conditions = factor(c("WT","WT","KO","KO"));
exp_study = DGEList(counts=rnaseqMatrix, group=conditions);exp_study = calcNormFactors(exp_study);exp_study = estimateCommonDisp(exp_study);exp_study = estimateTagwiseDisp(exp_study);et = exactTest(exp_study)
tTags = topTags(et,n=NULL,adjust.method = "fdr")
#r <- rownames(topTags(et)$table)
r <- rownames(tTags)
c=cpm(exp_study)[r, order(exp_study$samples$group)]
x=cbind(as.data.frame(tTags),c)
summary(de <- decideTestsDGE(et, p=0.05))
#write.table(tTags, file="edgeRtranscripts-0h-RNAseq.csv")

> > colnames(rnaseqMatrix)
>    [,1] 
-1   323
0  65244
1    300
> > > [1] "wt01"    "wt01IL4" "Ko01"    "Ko02"   
> col_ordering = c(31,33,15,16)#0h
rnaseqMatrix =rnaseqMatrix0[,col_ordering];rnaseqMatrix = rnaseqMatrix[rowSums(rnaseqMatrix)>=2,];conditions = factor(c("WT","WT","KO","KO"));
exp_study = DGEList(counts=rnaseqMatrix, group=conditions);exp_study = calcNormFactors(exp_study);exp_study = estimateCommonDisp(exp_study);exp_study = estimateTagwiseDisp(exp_study);et = exactTest(exp_study)
tTags = topTags(et,n=NULL,adjust.method = "fdr")
#r <- rownames(topTags(et)$table)
r <- rownames(tTags)
c=cpm(exp_study)[r, order(exp_study$samples$group)]
x=cbind(as.data.frame(tTags),c)
summary(de <- decideTestsDGE(et, p=0.05))
#write.table(tTags, file="edgeRtranscripts-0h-RNAseq.csv")

> > colnames(rnaseqMatrix)
>    [,1] 
-1   539
0  64513
1    415
> > > [1] "wt01" "wt02" "Ko01" "Ko02"
> col_ordering = c(35,36,3,4)#2h
rnaseqMatrix =rnaseqMatrix0[,col_ordering];rnaseqMatrix = rnaseqMatrix[rowSums(rnaseqMatrix)>=2,];conditions = factor(c("WT","WT","KO","KO"));
exp_study = DGEList(counts=rnaseqMatrix, group=conditions);exp_study = calcNormFactors(exp_study);exp_study = estimateCommonDisp(exp_study);exp_study = estimateTagwiseDisp(exp_study);et = exactTest(exp_study)
tTags = topTags(et,n=NULL,adjust.method = "fdr")
r <- rownames(tTags)
c=cpm(exp_study)[r, order(exp_study$samples$group)]
x=cbind(as.data.frame(tTags),c)
summary(de <- decideTestsDGE(et, p=0.05))
#write.table(tTags, file="edgeRtranscripts-2h-RNAseq.csv")
write.table(x, file="edgeRtranscriptsExpr-2h-RNAseq.csv")

> > colnames(rnaseqMatrix)
>    [,1] 
-1   762
0  60222
1    789
> > > > [1] "wt21"   "wt22"   "KOIFN1" "KOIFN2"
> col_ordering = c(35,36,1,2)#2h
rnaseqMatrix =rnaseqMatrix0[,col_ordering];rnaseqMatrix = rnaseqMatrix[rowSums(rnaseqMatrix)>=2,];conditions = factor(c("WT","WT","KO","KO"));
exp_study = DGEList(counts=rnaseqMatrix, group=conditions);exp_study = calcNormFactors(exp_study);exp_study = estimateCommonDisp(exp_study);exp_study = estimateTagwiseDisp(exp_study);et = exactTest(exp_study)
tTags = topTags(et,n=NULL,adjust.method = "fdr")
r <- rownames(tTags)
c=cpm(exp_study)[r, order(exp_study$samples$group)]
x=cbind(as.data.frame(tTags),c)
summary(de <- decideTestsDGE(et, p=0.05))
#write.table(tTags, file="edgeRtranscripts-2h-RNAseq.csv")
write.table(x, file="edgeRtranscriptsExpr-2h-RNAseq.csv")

> > colnames(rnaseqMatrix)
>    [,1] 
-1   635
0  62822
1    413
> > > > [1] "wt21" "wt22" "KO21" "KO22"
> col_ordering = c(37,38,19,20)#6h
rnaseqMatrix =rnaseqMatrix0[,col_ordering];rnaseqMatrix = rnaseqMatrix[rowSums(rnaseqMatrix)>=2,];conditions = factor(c("WT","WT","KO","KO"));
exp_study = DGEList(counts=rnaseqMatrix, group=conditions);exp_study = calcNormFactors(exp_study);exp_study = estimateCommonDisp(exp_study);exp_study = estimateTagwiseDisp(exp_study);et = exactTest(exp_study)
tTags = topTags(et,n=NULL,adjust.method = "fdr")
r <- rownames(tTags)
c=cpm(exp_study)[r, order(exp_study$samples$group)]
x=cbind(as.data.frame(tTags),c)
summary(de <- decideTestsDGE(et, p=0.05))
#write.table(tTags, file="edgeRtranscripts-6h-RNAseq.csv")
write.table(x, file="edgeRtranscriptsExpr-6h-RNAseq.csv")

>    [,1] 
-1   464
0  62217
1    298
> > > > colnames(rnaseqMatrix)
[1] "wt61" "wt62" "Ko61" "Ko62"
> col_ordering = c(39,40,3,4)#IFN
rnaseqMatrix =rnaseqMatrix0[,col_ordering];rnaseqMatrix = rnaseqMatrix[rowSums(rnaseqMatrix)>=2,];conditions = factor(c("WT","WT","KO","KO"));
exp_study = DGEList(counts=rnaseqMatrix, group=conditions);exp_study = calcNormFactors(exp_study);exp_study = estimateCommonDisp(exp_study);exp_study = estimateTagwiseDisp(exp_study);et = exactTest(exp_study)
tTags = topTags(et,n=NULL,adjust.method = "fdr")
r <- rownames(tTags)
c=cpm(exp_study)[r, order(exp_study$samples$group)]
x=cbind(as.data.frame(tTags),c)
summary(de <- decideTestsDGE(et, p=0.05))
#write.table(tTags, file="edgeRtranscripts-IFN-RNAseq.csv")
write.table(x, file="edgeRtranscriptsExpr-IFN-RNAseq.csv")

> > colnames(rnaseqMatrix)
>    [,1] 
-1   356
0  59861
1    359
> > > > [1] "wtIFN1" "wtIFN2" "KOIFN1" "KOIFN2"
> col_ordering = c(32,34,17,18)#IL4
rnaseqMatrix =rnaseqMatrix0[,col_ordering];rnaseqMatrix = rnaseqMatrix[rowSums(rnaseqMatrix)>=2,];conditions = factor(c("WT","WT","KO","KO"));
exp_study = DGEList(counts=rnaseqMatrix, group=conditions);exp_study = calcNormFactors(exp_study);exp_study = estimateCommonDisp(exp_study);exp_study = estimateTagwiseDisp(exp_study);et = exactTest(exp_study)
tTags = topTags(et,n=NULL,adjust.method = "fdr")
r <- rownames(tTags)
c=cpm(exp_study)[r, order(exp_study$samples$group)]
x=cbind(as.data.frame(tTags),c)
summary(de <- decideTestsDGE(et, p=0.05))
#write.table(tTags, file="edgeRtranscripts-IL4-RNAseq.csv")
write.table(x, file="edgeRtranscriptsExpr-IL4-RNAseq.csv")

> > colnames(rnaseqMatrix)
>    [,1] 
-1   475
0  62841
1    328
> > > > [1] "wt01IL4" "wt02IL4" "Ko1IL4"  "Ko2IL4"
> col_ordering = c(31,33,15,16)#0h
rnaseqMatrix =rnaseqMatrix0[,col_ordering];rnaseqMatrix = rnaseqMatrix[rowSums(rnaseqMatrix)>=2,];conditions = factor(c("WT","WT","KO","KO"));
exp_study = DGEList(counts=rnaseqMatrix, group=conditions);exp_study = calcNormFactors(exp_study);exp_study = estimateCommonDisp(exp_study);exp_study = estimateTagwiseDisp(exp_study);et = exactTest(exp_study)
tTags = topTags(et,n=NULL,adjust.method = "fdr")
#r <- rownames(topTags(et)$table)
r <- rownames(tTags)
c=cpm(exp_study)[r, order(exp_study$samples$group)]
x=cbind(as.data.frame(tTags),c)
summary(de <- decideTestsDGE(et, p=0.05))
#write.table(tTags, file="edgeRtranscripts-0h-RNAseq.csv")
write.table(x, file="edgeRtranscriptsExpr-0h-RNAseq.csv")

> colnames(rnaseqMatrix)
>    [,1] 
-1   539
0  64513
1    415
> > > > [1] "wt01" "wt02" "Ko01" "Ko02"