{"id":712,"date":"2021-03-18T11:36:26","date_gmt":"2021-03-18T03:36:26","guid":{"rendered":"http:\/\/www.wuchangsong.com\/?p=712"},"modified":"2021-03-23T18:50:32","modified_gmt":"2021-03-23T10:50:32","slug":"edger%e5%b7%ae%e5%bc%82%e5%88%86%e6%9e%90","status":"publish","type":"post","link":"http:\/\/www.wuchangsong.com\/?p=712","title":{"rendered":"edgeR\u4e4bTMM\u6807\u51c6\u5316"},"content":{"rendered":"<pre>library(edgeR)\nlibrary(ggplot2)\ndata &lt;- read.delim('..\/mouse_TPM_notCross.matrix.xls', row.names = 1, sep = '\\t', check.names = FALSE)\ngroup &lt;- factor(rep(c('A', 'B', 'C'), each = 3))\ny &lt;- DGEList(counts = data, group = group)\ny &lt;- calcNormFactors(y)\nlogcpm &lt;- cpm(y, prior.count=3, log=TRUE)\nwrite.table(logcpm, file=\"mouse_TMM.xls\", sep=\"\\t\", quote=F, row.names=T, col.names=T)\n#dgList &lt;- estimateCommonDisp(y)\n#dgList &lt;- estimateTagwiseDisp(dgList)\n#norm_counts.table &lt;- t(t(dgList$pseudo.counts)*(dgList$samples$norm.factors))\n#write.table(norm_counts.table, file=\"mouse_gc_pareto_TMM.xls\", sep=\"\\t\", quote=F)\n#pheatmap(log(data+1),cluster_rows=T,cluster_cols=T,scale=\"none\",border_color=\"white\",color=colorRampPalette(rev(c(\"red\",\"white\",\"blue\")))(102))\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>library(edgeR) library(ggplot2) data &lt;- read.delim(&#8216;..\/mouse_TPM_notCross.matrix.xls&#8217;, row.names = 1, sep = &#8216;\\t&#8217;, check.names = FALSE) group &lt;- factor(rep(c(&#8216;A&#8217;, &#8216;B&#8217;, &#8216;C&#8217;), each = 3)) y &lt;- DGEList(counts = data, group = group) y &lt;- calcNormFactors(y) logcpm &lt;- cpm(y, prior.count=3, log=TRUE) write.table(logcpm, file=&#8221;mouse_TMM.xls&#8221;, sep=&#8221;\\t&#8221;, quote=F, row.names=T, col.names=T) #dgList &lt;- estimateCommonDisp(y) #dgList &lt;- estimateTagwiseDisp(dgList) #norm_counts.table &lt;- t(t(dgList$pseudo.counts)*(dgList$samples$norm.factors)) #write.table(norm_counts.table, file=&#8221;mouse_gc_pareto_TMM.xls&#8221;, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,10],"tags":[],"_links":{"self":[{"href":"http:\/\/www.wuchangsong.com\/index.php?rest_route=\/wp\/v2\/posts\/712"}],"collection":[{"href":"http:\/\/www.wuchangsong.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.wuchangsong.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.wuchangsong.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.wuchangsong.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=712"}],"version-history":[{"count":8,"href":"http:\/\/www.wuchangsong.com\/index.php?rest_route=\/wp\/v2\/posts\/712\/revisions"}],"predecessor-version":[{"id":727,"href":"http:\/\/www.wuchangsong.com\/index.php?rest_route=\/wp\/v2\/posts\/712\/revisions\/727"}],"wp:attachment":[{"href":"http:\/\/www.wuchangsong.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=712"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.wuchangsong.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=712"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.wuchangsong.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=712"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}