{"id":29228,"date":"2024-02-21T17:47:20","date_gmt":"2024-02-21T09:47:20","guid":{"rendered":"http:\/\/www.biocloudservice.com\/wordpress\/?p=29228"},"modified":"2024-02-21T17:47:22","modified_gmt":"2024-02-21T09:47:22","slug":"%e4%b8%89%e5%88%86%e9%92%9f%e5%ad%a6%e4%bc%9a%e5%a6%82%e4%bd%95%e7%bb%98%e5%88%b6%e8%81%9a%e7%b1%bb%e5%9f%ba%e5%9b%a0%e8%a1%a8%e8%be%be%e8%b6%8b%e5%8a%bf%e5%8a%9f%e8%83%bd%e6%b3%a8%e9%87%8a%e7%bb%84","status":"publish","type":"post","link":"http:\/\/www.biocloudservice.com\/wordpress\/?p=29228","title":{"rendered":"\u4e09\u5206\u949f\u5b66\u4f1a\u5982\u4f55\u7ed8\u5236\u805a\u7c7b+\u57fa\u56e0\u8868\u8fbe\u8d8b\u52bf+\u529f\u80fd\u6ce8\u91ca\u7ec4\u5408\u56fe"},"content":{"rendered":"<p>\u4e09\u5206\u949f\u5b66\u4f1a\u5982\u4f55\u7ed8\u5236\u805a\u7c7b+\u57fa\u56e0\u8868\u8fbe\u8d8b\u52bf+\u529f\u80fd\u6ce8\u91ca\u7ec4\u5408\u56fe<\/p>\n<p>\u4eca\u5929\u5c0f\u679c\u60f3\u5b89\u5229\u4e00\u4e2aR\u5305ClusterGVis\uff0c\u5206\u4eab\u4e00\u4e0b\u5982\u4f55\u5229\u7528ClusterGVis\u5305\u7ed8\u5236\u805a\u7c7b+\u57fa\u56e0\u8868\u8fbe\u8d8b\u52bf+\u529f\u80fd\u6ce8\u91ca\u7ec4\u5408\u56fe\uff0c\u4e0b\u9762\u8fdb\u884c\u64cd\u4f5c\uff0c\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<ol>\n<li>\u5b89\u88c5\u9700\u8981\u7684R\u5305<\/li>\n<\/ol>\n<p>install.packages(&#8220;devtools&#8221;)<\/p>\n<p>devtools::install_github(&#8220;junjunlab\/ClusterGVis&#8221;)<\/p>\n<p>install.packages(\u201cBiobase\u201d)<\/p>\n<ol>\n<li>\u8f7d\u5165\u9700\u8981\u7684R\u5305<\/li>\n<\/ol>\n<p>library(ClusterGVis)<\/p>\n<p>library(Biobase)<\/p>\n<ol>\n<li>\u4ee3\u7801\u5c55\u793a<\/li>\n<\/ol>\n<p>#\u6570\u636e\u8bfb\u53d6-\u57fa\u56e0\u8868\u8fbe\u77e9\u9635\u6587\u4ef6<\/p>\n<p>expr &lt;- read.table(&#8220;exp.txt&#8221;,header = T,row.names = 1,sep = &#8220;\\t&#8221;)<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"640\" height=\"183\" class=\"wp-image-29229\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/dingtalk_20230307110048.jpeg?resize=640%2C183\" alt=\"Dingtalk_20230307110048\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/dingtalk_20230307110048.jpeg?w=1226 1226w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/dingtalk_20230307110048.jpeg?resize=300%2C86 300w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/dingtalk_20230307110048.jpeg?resize=1024%2C293 1024w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/dingtalk_20230307110048.jpeg?resize=768%2C220 768w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/dingtalk_20230307110048.jpeg?resize=600%2C172 600w\" sizes=\"(max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><\/p>\n<p>#\u5f00\u59cb\u7ed8\u56fe<\/p>\n<p>ck &lt;- clusterData(exp = expr,<\/p>\n<p>cluster.method = &#8220;kmeans&#8221;,<\/p>\n<p>cluster.num = 8)<\/p>\n<p>#\u9700\u8981\u6807\u8bb0\u7684\u57fa\u56e0\u540d\u79f0<\/p>\n<p>markGenes = rownames(expr)[sample(1:nrow(expr),30,replace = F)]<\/p>\n<p>pdf(&#8216;clustergene.pdf&#8217;,height = 10,width = 6,onefile = F)<\/p>\n<p>visCluster(object = ck,<\/p>\n<p>plot.type = &#8220;heatmap&#8221;,<\/p>\n<p>column_names_rot = 45,<\/p>\n<p>markGenes = markGenes)<\/p>\n<p>dev.off()<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"469\" height=\"770\" class=\"wp-image-29230\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/dingtalk_20230307143656.jpeg?resize=469%2C770\" alt=\"Dingtalk_20230307143656\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/dingtalk_20230307143656.jpeg?w=469 469w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/dingtalk_20230307143656.jpeg?resize=183%2C300 183w\" sizes=\"(max-width: 469px) 100vw, 469px\" data-recalc-dims=\"1\" \/><\/p>\n<p>library(org.Mm.eg.db)<\/p>\n<p># enrich for clusters<\/p>\n<p>enrich &lt;- enrichCluster(object = ck,<\/p>\n<p>OrgDb = org.Mm.eg.db,<\/p>\n<p>type = &#8220;BP&#8221;,<\/p>\n<p>pvalueCutoff = 0.05,<\/p>\n<p>topn = 5,<\/p>\n<p>seed = 5201314)<\/p>\n<p>pdf(&#8216;enrich.pdf&#8217;,height = 10,width = 11,onefile = F)<\/p>\n<p>visCluster(object = ck,<\/p>\n<p>plot.type = &#8220;both&#8221;,<\/p>\n<p>column_names_rot = 45,<\/p>\n<p>show_row_dend = F,<\/p>\n<p>markGenes = markGenes,<\/p>\n<p>markGenes.side = &#8220;left&#8221;,<\/p>\n<p>genes.gp = c(&#8216;italic&#8217;,fontsize = 12,col = &#8220;black&#8221;),<\/p>\n<p>annoTerm.data = enrich,<\/p>\n<p>line.side = &#8220;left&#8221;,<\/p>\n<p>go.col = rep(ggsci::pal_d3()(8),each = 5),<\/p>\n<p>go.size = &#8220;pval&#8221;,<\/p>\n<p>mulGroup = c(2,2,2),<\/p>\n<p>mline.col = c(ggsci::pal_lancet()(3)))<\/p>\n<p>dev.off()<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"640\" height=\"563\" class=\"wp-image-29231\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/dingtalk_20230307143801.jpeg?resize=640%2C563\" alt=\"Dingtalk_20230307143801\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/dingtalk_20230307143801.jpeg?w=859 859w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/dingtalk_20230307143801.jpeg?resize=300%2C264 300w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/dingtalk_20230307143801.jpeg?resize=768%2C675 768w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/dingtalk_20230307143801.jpeg?resize=600%2C527 600w\" sizes=\"(max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><\/p>\n<p>\u770b\u8d77\u6765\u7ed8\u56fe\u6548\u679c\u975e\u5e38\u4e0d\u9519yyds\uff0c\u7528\u8d77\u6765\u975e\u5e38\u65b9\u4fbf\uff0c\u4eca\u5929\u5c0f\u679c\u7684\u5206\u4eab\u5c31\u5230\u8fd9\u91cc\uff0c\u6709\u9700\u8981\u7684\u53ef\u4ee5\u501f\u9274\u5b66\u4e60,\u4e0b\u671f\u518d\u89c1\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e09\u5206\u949f\u5b66\u4f1a\u5982\u4f55\u7ed8\u5236\u805a\u7c7b+\u57fa\u56e0\u8868\u8fbe\u8d8b\u52bf+\u529f\u80fd\u6ce8\u91ca\u7ec4\u5408\u56fe \u4eca\u5929\u5c0f\u679c\u60f3\u5b89\u5229\u4e00\u4e2aR\u5305ClusterGVis\uff0c\u5206\u4eab\u4e00\u4e0b\u5982 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":""},"categories":[1],"tags":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/29228"}],"collection":[{"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=29228"}],"version-history":[{"count":1,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/29228\/revisions"}],"predecessor-version":[{"id":29232,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/29228\/revisions\/29232"}],"wp:attachment":[{"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=29228"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=29228"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=29228"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}