{"id":578,"date":"2020-10-21T09:50:56","date_gmt":"2020-10-21T01:50:56","guid":{"rendered":"http:\/\/www.wuchangsong.com\/?p=578"},"modified":"2021-01-14T09:34:08","modified_gmt":"2021-01-14T01:34:08","slug":"__trashed","status":"publish","type":"post","link":"http:\/\/www.wuchangsong.com\/?p=578","title":{"rendered":"Upset plot\uff1a\u8fdb\u9636\u7248Venn plot\u5b9e\u73b0\u591a\u5143\u7d20\u53ef\u89c6\u5316"},"content":{"rendered":"<pre>if (!requireNamespace(\"BiocManager\", quietly = TRUE))\r\n    install.packages(\"BiocManager\")\r\nBiocManager::install(\"UpSetR\")\r\nlibrary(UpSetR)\r\npathway=read.table(\"carp_combined_id1.xls\",header=T,sep=\"\\t\")\r\nupset(pathway,nsets = 9, nintersects = 50,mb.ratio = c(0.5, 0.5),\r\n      order.by = \"freq\", decreasing = c(TRUE,FALSE),\r\n      queries = list(list(query=intersects, params=list(\"datra\", \"caaur\",\"meamb\",\"onmac\",\"ctide\",\"cycar\",\"sigra\",\"sians\",\"sirhi\"), color=\"red\", active=T)))\r\n#\u8be6\u7ec6\u53c2\u6570\u67e5\u770b\u5b98\u7f51\r\n#\u884c\u5217\u8f6c\u7f6eawk '{for(i=0;++i<=NF;)a[i]=a[i]?a[i] FS $i:$i}END{for(i=0;i++<NF;)print a[i]}' carp_combined_absentid.txt > carp_combined_absentid_convert.txt\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>if (!requireNamespace(&#8220;BiocManager&#8221;, quietly = TRUE)) install.packages(&#8220;BiocManager&#8221;) BiocManager::install(&#8220;UpSetR&#8221;) library(UpSetR) pathway=read.table(&#8220;carp_combined_id1.xls&#8221;,header=T,sep=&#8221;\\t&#8221;) upset(pathway,nsets = 9, nintersects = 50,mb.ratio = c(0.5, 0.5), order.by = &#8220;freq&#8221;, decreasing = c(TRUE,FALSE), queries = list(list(query=intersects, params=list(&#8220;datra&#8221;, &#8220;caaur&#8221;,&#8221;meamb&#8221;,&#8221;onmac&#8221;,&#8221;ctide&#8221;,&#8221;cycar&#8221;,&#8221;sigra&#8221;,&#8221;sians&#8221;,&#8221;sirhi&#8221;), color=&#8221;red&#8221;, active=T))) #\u8be6\u7ec6\u53c2\u6570\u67e5\u770b\u5b98\u7f51 #\u884c\u5217\u8f6c\u7f6eawk &#8216;{for(i=0;++i<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[],"_links":{"self":[{"href":"http:\/\/www.wuchangsong.com\/index.php?rest_route=\/wp\/v2\/posts\/578"}],"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=578"}],"version-history":[{"count":5,"href":"http:\/\/www.wuchangsong.com\/index.php?rest_route=\/wp\/v2\/posts\/578\/revisions"}],"predecessor-version":[{"id":674,"href":"http:\/\/www.wuchangsong.com\/index.php?rest_route=\/wp\/v2\/posts\/578\/revisions\/674"}],"wp:attachment":[{"href":"http:\/\/www.wuchangsong.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=578"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.wuchangsong.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=578"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.wuchangsong.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=578"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}