> library("edgeR") Loading required package: limma > a<-read.delim("C:\\100bp50offsetcountcolmockvsfox1DPI.txt",row.name=1,TRUE) > head(a) S1 S2 S5 S6 Chr1:1 86 49 56 40 Chr1:51 42 30 39 31 Chr1:101 4 7 3 3 Chr1:151 0 2 1 2 Chr1:201 1 0 1 4 Chr1:251 32 25 17 18 > group<-factor(c(1,1,2,2)) > b<-DGEList(counts=1, group=group) Error in DGEList(counts = 1, group = group) : Length of 'group' must equal number of columns in 'counts' > b<-DGEList(counts=a, group=group) > dim(b) [1] 2393345 4 > keep<-rowSums(cpm(b)>1)>=2 > b<-b[keep,] > dim(b) [1] 77811 4 > b$samplesSlib.size<-colSums(b$counts) > b<-calcNormFactors(b) > b$samples group lib.size norm.factors S1 1 18148268 1.0931307 S2 1 17169871 1.0974397 S5 2 16812419 0.9413272 S6 2 17653722 0.8855368 > b<-estimateCommonDisp(b,verbose=TRUE) Disp = 0.00703 , BCV = 0.0839 > b<-estimateTagwiseDisp(b) > top<-topTags(et) > et<-exactTest(b) > topTags(et) Comparison of groups: 2-1 logFC logCPM PValue FDR ChrC:651 3.143491 6.489829 1.577953e-126 1.227821e-121 ChrC:137501 2.899128 7.144442 1.286869e-114 5.006629e-110 ChrC:701 3.019486 5.973865 2.110958e-113 5.475191e-109 ChrC:136701 2.699085 6.399060 6.388976e-109 1.242831e-104 ChrC:131801 2.709633 6.453667 1.179523e-107 1.835597e-103 ChrC:106701 2.717326 6.678797 1.312477e-106 1.702086e-102 ChrC:1351 2.936272 5.621700 3.739849e-101 4.157163e-97 ChrC:101051 2.920198 7.183182 1.384538e-100 1.346654e-96 ChrC:105501 2.665605 6.172738 2.665146e-100 2.304196e-96 ChrC:131851 2.775614 6.647464 1.048855e-99 8.161246e-96 > detags<-rownames(topTags(et)) > cpm(b)[detags,] S1 S2 S5 S6 ChrC:651 17.64253 18.89306 152.59712 170.28059 ChrC:137501 34.22650 32.63829 232.33938 266.61514 ChrC:701 13.20669 14.38208 106.34408 117.37975 ChrC:136701 22.88488 22.13035 140.90748 151.53821 ChrC:131801 23.74180 22.71413 145.70971 158.31873 ChrC:106701 27.52234 26.53520 167.38292 188.25536 ChrC:1351 11.84570 10.87943 82.20656 91.92081 ChrC:101051 36.79727 30.99311 241.05921 272.37218 ChrC:105501 20.56614 18.68078 120.62439 128.57400 ChrC:131851 27.06867 23.98782 165.67687 184.16147 > summary(de<-decideTestsDGE(et)) [,1] -1 213 0 75809 1 1789 > detags<-rownames(b)[as.logical(de)] > top<-topTags(et,77811) > write.csv(top$table,file="noDEedgeR2.csv" + ) > detags<-rownames(topTags(et,77811)) > detag2<-cpm(b)[detags,] > write.table(detag2,file="noDEdetag2.csv",sep=",") >