{"id":23536,"date":"2024-01-05T17:07:23","date_gmt":"2024-01-05T09:07:23","guid":{"rendered":"http:\/\/www.biocloudservice.com\/wordpress\/?p=23536"},"modified":"2024-01-05T17:07:25","modified_gmt":"2024-01-05T09:07:25","slug":"%e4%b8%80%e9%94%ae%e7%bb%98%e5%88%b6%e5%be%ae%e7%94%9f%e7%89%a9%e5%85%b3%e8%81%94%e7%bd%91%e5%85%b1%e7%8e%b0%e5%9b%be","status":"publish","type":"post","link":"http:\/\/www.biocloudservice.com\/wordpress\/?p=23536","title":{"rendered":"\u4e00\u952e\u7ed8\u5236\u5fae\u751f\u7269\u5173\u8054\u7f51\u5171\u73b0\u56fe"},"content":{"rendered":"<p><strong>\u80cc\u666f<\/strong>\uff1a<\/p>\n<p>\u5173\u8054\u7f51\u7edc\u5206\u6790\u4e3b\u8981\u7528\u4e8e\u5bfb\u627e\u7279\u5b9a\u5fae\u751f\u7269\u7fa4\u843d\u5728\u65f6\u7a7a\u53d8\u5316\uff0c\u73af\u5883\u8fc7\u7a0b\u9a71\u52a8\u4e0b\u6240\u5448\u73b0\u7684\u5171\u73b0\uff08Co-occurrence\uff09\u6216\u4e92\u65a5\uff08Co-exclusion\uff09\u6a21\u5f0f\uff0c\u4ece\u800c\u5206\u6790\u73af\u5883\u5dee\u5f02\u6216\u5b9e\u9a8c\u5904\u7406\u662f\u5426\u5bfc\u81f4\u4e86\u7fa4\u843d\u7269\u79cd\u88c5\u914d\u7684\u5dee\u5f02\uff0c\u63a2\u7a76\u5fae\u751f\u7269\u7fa4\u843d\u4e2d\u662f\u5426\u5b58\u5728\u7279\u5b9a\u7684\u6a21\u5757\u5355\u5143\uff08Module\uff09\u4ee5\u5b8c\u6210\u7279\u5b9a\u7684\u751f\u6001\u529f\u80fd\uff0c\u5e76\u636e\u6b64\u5bfb\u627e\u8db3\u4ee5\u64ac\u52a8\u6574\u4e2a\u7fa4\u843d\u7684\u7ec4\u6210\u53d8\u5316\u7684\u5173\u952e\u7269\u79cd\uff08Hubs\u6216keystone species\uff09\u3002\u57fa\u4e8e\u7fa4\u843d\u6570\u636e\u76f8\u5173\u6027\u6784\u5efa\u7684Co-occurrence\u7f51\u7edc\u56fe\u3002\u53ef\u4ee5\u91c7\u7528R\u4e2digraph\u5305\u6784\u5efa\u5e76\u5b9e\u73b0\u51fa\u56fe\u3002\u5f53\u7136\uff0c\u9664\u6b64\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u975e\u547d\u4ee4\u884c\u7684\u8f6f\u4ef6\uff0c\u4f8b\u5982cytoscape\uff0cgephi\uff0cpajek\u7b49\u3002\u4e3a\u4e86\u63a2\u7a76\u5fae\u751f\u7269\u4e4b\u95f4\u7684\u5173\u8054\u6027\uff0c\u628a\u5171\u73b0\u6027\u7f51\u7edc\u5f15\u5165\u5230\u5fae\u751f\u7269\u7ec4\u9886\u57df\uff0c\u5f00\u53d1\u7684ggClusterNet\u5305\u53ef\u4ee5\u5feb\u901f\u7684\u7ed8\u5236\u4f60\u60f3\u8981\u7684\u7f51\u7edc\u56fe\u3002<\/p>\n<p><strong>\u4e3b\u8981\u64cd\u4f5c\u5185\u5bb9\uff1a<\/strong><\/p>\n<p>1\u3001R\u73af\u5883\u7684\u914d\u7f6e\u4ee5\u53caR\u5305\u7684\u4e0b\u8f7d<\/p>\n<p>R\u8bed\u8a00\u4e0b\u8f7d\u5730\u5740<a href=\"https:\/\/www.r-project.org\/\">https:\/\/www.r-project.org\/<\/a><\/p>\n<p>Rstudio\u4e0b\u8f7d\u5730\u5740\uff1a<a href=\"https:\/\/www.rstudio.com\/products\/rstudio\/download\/&quot; \\l &quot;download\">https:\/\/www.rstudio.com\/products\/rstudio\/download\/#download<\/a><\/p>\n<p>R\u5305\u7684\u5b89\u88c5<\/p>\n<p>ggClusterNet\u5b89\u88c5\u8fc7\u7a0b\u4e2d\u9700\u8981\u5f88\u591a\u4f9d\u8d56\u7684\u5b89\u88c5\u5305\uff0c\u8017\u65f6\u4f1a\u4e45\u4e00\u4e9b\uff0c\u5e0c\u671b\u4f60\u8010\u5fc3\u7b49\u5f85\uff08\u5b89\u88c5\u901f\u5ea6\u53d6\u51b3\u4f60\u7684R\u73af\u5883\u4e2d\u4f9d\u8d56\u5305\u6709\u591a\u5c11\u4e2a\u4ee5\u524d\u6ca1\u6709\u4e0b\u8f7d\u8fc7\u54e6\uff5e\uff09<\/p>\n<p>#\u5b89\u88c5ggClusterNet<\/p>\n<p>devtools::install_github(&#8220;taowenmicro\/ggClusterNet&#8221;)<\/p>\n<p>2\u3001\u6784\u5efa\u6570\u636e\u683c\u5f0f<\/p>\n<p>#\u52a0\u8f7d\u6240\u7528\u7684\u5305<\/p>\n<p>library(ggClusterNet)<\/p>\n<p>library(phyloseq)<\/p>\n<p>library(tidyverse)<\/p>\n<p>library(igraph)<\/p>\n<p>library(sna)<\/p>\n<p>library(network)<\/p>\n<p>#\u6839\u636e\u81ea\u5df1\u7684\u6570\u636e\u683c\u5f0f\u5206\u522b\u5bfc\u5165otuable\u3001taxnomoy\u548cmetadata\u6570\u636e<\/p>\n<p>otutable &lt;- read.table(&#8220;table.xls&#8221;, header = T, sep = &#8220;\\t&#8221;,row.names = 1)<\/p>\n<p>taxnomoy &lt;- read.table(&#8220;tax.txt&#8221;, header = T,sep = &#8220;\\t&#8221;, fill=TRUE, na.strings = &#8220;NA&#8221;, row.names = 1)<\/p>\n<p>metadata &lt;- read.table(&#8220;metadata.tsv&#8221;, header = T,sep = &#8220;\\t&#8221;, row.names = 1)<\/p>\n<p>#\u6700\u540e\u5f97\u5230ps\u7684\u6570\u636e\u683c\u5f0f<\/p>\n<p>ps &lt;- phyloseq(sample_data(metadata),otu_table(as.matrix(otutable),taxa_are_rows = T),tax_table(as.matrix(taxnomoy)))<\/p>\n<p>#\u6784\u5efa\u597d\u540e\u53ef\u4ee5ps\u4e00\u4e0b\u770b\u4e00\u4e0b\u8fd9\u4e2a\u6570\u636e\u96c6(\u4e3b\u8981\u5305\u62ecotu_table()\u3001sample_table()\u3001tax_table()\u3001phy_table()\u56db\u4e2a\u90e8\u5206\uff09<\/p>\n<p>\u6570\u636e\u96c6\u7684\u6784\u5efa\u662f\u6700\u9ebb\u70e6\u7684\u5730\u65b9\u4f46\u662f\u4e00\u65e6\u6784\u5efa\u597d\uff0c\u64cd\u4f5c\u8d77\u6765\u5c31\u5f88\u65b9\u4fbf\uff0c\u5e0c\u671b\u4f60\u8010\u5fc3\u505a\u597d\u8fd9\u4e00\u6b65\uff5e<\/p>\n<p>\u6784\u5efa\u597d\u6570\u636e\u683c\u5f0f\u540e\uff0c\u505a\u5171\u73b0\u7f51\u7edc\u5206\u6790\u53ea\u9700\u4e00\u884c\u4ee3\u7801\u5c31\u53ef\u4ee5\u641e\u5b9a\uff0c\u5feb\u6765\u8bd5\u4e00\u4e0b\uff5e<\/p>\n<p>3\u3001\u4e00\u952e\u5206\u6790<\/p>\n<p>#\u5148\u521b\u5efa\u4e00\u4e2a\u5b58\u50a8\u7684\u8def\u5f84<\/p>\n<p>path1 = &#8220;.\/result_net\/&#8221;<\/p>\n<p>dir.create(path1)<\/p>\n<p>result1 = network.2(ps = ps,#\u6784\u5efa\u7684\u6570\u636e\u96c6<\/p>\n<p>N = 100, #\u53d6\u524d\u4e30\u5ea6\u6700\u9ad8\u7684\u524d100<\/p>\n<p>layout_net = &#8220;model_Gephi.2&#8221;, #\u5e03\u5c40\u683c\u5f0fmodel_Gephi.2\u8fd9\u91cc\u6211\u7528\u7684Gephi\u7684<\/p>\n<p>r.threshold=0.6, #\u76f8\u5173\u6027\u7684\u9608\u503c<\/p>\n<p>p.threshold=0.01, #\u663e\u8457\u6027\u7684\u9608\u503c<\/p>\n<p>label = TRUE, #\u662f\u5426\u5728\u8282\u70b9\u4e0a\u6807\u8bb0\u6807\u7b7e<\/p>\n<p>path = path1, #\u5b58\u653e\u7684\u6587\u4ef6<\/p>\n<p>lab = &#8220;Genus&#8221;, #\u6807\u7b7e\u7528Genus \u8fd9\u91cc\u4e00\u5b9a\u8981\u4e0etaxnomoy\u4e2d\u5217\u540d\u4e00\u81f4<\/p>\n<p>zipi = TRUE #\u662f\u5426\u7ed8\u5236zipi\u56fe)<\/p>\n<p>4\u3001\u8f93\u51fa\u6587\u4ef6\u89e3\u8bfb<\/p>\n<p>1\u3001\u6709\u4e24\u5f20pdf\u7684\u5173\u8054\u7f51\u7edc\u56fe(networkXX.pdf)\uff0c\u662f\u6839\u636e\u5305\u4e2d\u9ed8\u8ba4\u7684\u53c2\u6570\u7ed8\u5236\u7684\uff0c\u4f46\u662f\u4e00\u822c\u56fe\u5f62\u8fbe\u4e0d\u5230\u60f3\u8981\u7684\u7406\u60f3\u6548\u679c\u3002<\/p>\n<p>2\u3001\u4f1a\u8f93\u51fa\u53ef\u4ee5\u5bfc\u5165\u5230Gephi\u4e2d\u7684\u8fb9\u6587\u4ef6\u548c\u70b9\u6587\u4ef6\uff08XX_Gephi_edge.csv\u3001XX_Gephi_node.csv\uff09,\u53ef\u4ee5\u5bfc\u5165\u5230Gephi\u8fdb\u884c\u8c03\u8282\u56fe\u7684\u5e03\u5c40\u3002<\/p>\n<p>5\u3001\u51fa\u7248\u7ea7\u56fe\u5f62\u89e3\u8bfb<\/p>\n<p>\u5982\u4e0b\u56fe\u5373\u4e3a\u6700\u540eGephi\u505a\u51fa\u7684\u56fe\uff1a\u6bcf\u4e2a\u8282\u70b9\u4ee3\u8868\u4e00\u4e2a\u5fae\u751f\u7269\u7684\u5c5e\u6c34\u5e73\uff0c\u989c\u8272\u4ee3\u8868\u5c5e\u6240\u5728\u7684\u95e8\u7c7b\uff0c\u5927\u5c0f\u4ee3\u8868\u5c5e\u7684\u76f8\u5bf9\u4e30\u5ea6\uff0c\u4e24\u4e2a\u5c5e\u6c34\u5e73\u4e4b\u95f4\u6b63\u76f8\u5173\u7528\u7ea2\u8272\u8fde\u63a5\uff0c\u8d1f\u76f8\u5173\u7528\u84dd\u8272\u8fde\u63a5\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"640\" height=\"640\" class=\"wp-image-23539\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/01\/s_network.png?resize=640%2C640\" alt=\"S_network\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/01\/s_network.png?w=1024 1024w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/01\/s_network.png?resize=300%2C300 300w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/01\/s_network.png?resize=150%2C150 150w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/01\/s_network.png?resize=768%2C768 768w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/01\/s_network.png?resize=600%2C600 600w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/01\/s_network.png?resize=100%2C100 100w\" sizes=\"(max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><\/p>\n<p>ggClusterNet\u7684\u5305\u5bf9\u5173\u8054\u7f51\u7edc\u7684\u5e03\u5c40\u4ee5\u53ca\u4e00\u4e9b\u62d3\u6251\u5b66\u6307\u6570\u7684\u8ba1\u7b97\u90fd\u5177\u6709\u76f8\u5e94\u7684\u529f\u80fd\uff0c\u5982\u679c\u60f3\u7ed8\u5236\u51fa\u6ee1\u610f\u7684\u5173\u8054\u7f51\u7edc\u56fe\uff0c\u5c31\u7528\u591a\u591a\u63a2\u7d22\uff0c\u8fd9\u91cc\u53ea\u662f\u7b80\u5355\u7684\u7ed8\u5236\u51fa\u7f51\u7edc\u56fe\u3002<\/p>\n<p>\u597d\u4e86\uff0c\u8fd9\u6837\u6211\u4eec\u5173\u8054\u7f51\u7edc\u56fe\u5c31\u5b8c\u6210\u4e86\u3002\u5c0f\u4f19\u4f34\u4eec\u5982\u679c\u6709\u4ec0\u4e48\u95ee\u9898\u5c31\u548c\u5c0f\u679c\u8ba8\u8bba\u5427\uff5e<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u80cc\u666f\uff1a \u5173\u8054\u7f51\u7edc\u5206\u6790\u4e3b\u8981\u7528\u4e8e\u5bfb\u627e\u7279\u5b9a\u5fae\u751f\u7269\u7fa4\u843d\u5728\u65f6\u7a7a\u53d8\u5316\uff0c\u73af\u5883\u8fc7\u7a0b\u9a71\u52a8\u4e0b\u6240\u5448\u73b0\u7684\u5171\u73b0\uff08Co-occurrenc [&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\/23536"}],"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=23536"}],"version-history":[{"count":1,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/23536\/revisions"}],"predecessor-version":[{"id":23540,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/23536\/revisions\/23540"}],"wp:attachment":[{"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=23536"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=23536"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=23536"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}