{"id":68853,"date":"2026-12-03T09:09:22","date_gmt":"2026-12-03T01:09:22","guid":{"rendered":"https:\/\/www.biocloudservice.com\/wordpress\/?p=68853"},"modified":"2026-12-03T09:09:22","modified_gmt":"2026-12-03T01:09:22","slug":"r-guide-nichenetr-practice","status":"publish","type":"post","link":"https:\/\/www.biocloudservice.com\/wordpress\/r-guide-nichenetr-practice\/","title":{"rendered":"NicheNet \u7ed9\u914d\u4f53\u6392\u4e86\u540d\uff0c\u600e\u6837\u786e\u8ba4\u63a5\u6536\u7ec6\u80de\u7684\u80cc\u666f\u9009\u5bf9\u4e86\uff1f"},"content":{"rendered":"<div class=\"ysx-r-practice\" id=\"ysx-r-nichenetr\" style=\"max-width:820px;margin:0 auto;color:#203449;font-size:17px;line-height:1.88;overflow-wrap:break-word;\">\n<p style=\"margin:.5em 0 1em\">\u5019\u9009\u914d\u4f53\u5728\u4e24\u4e2a\u63a5\u6536\u7ec6\u80de\u7c7b\u578b\u4e2d\u6392\u540d\u4e0d\u540c\uff0c\u5148\u522b\u6025\u7740\u89e3\u91ca\u4e3a\u4fe1\u53f7\u8f6c\u5411\u3002\u4e24\u79cd\u63a5\u6536\u7ec6\u80de\u80fd\u8868\u8fbe\u3001\u80fd\u63a5\u53d7\u5dee\u5f02\u68c0\u9a8c\u7684\u57fa\u56e0\u672c\u6765\u5c31\u53ef\u80fd\u4e0d\u540c\u3002\u628a\u54cd\u5e94\u57fa\u56e0\u3001\u53ef\u68c0\u6d4b\u80cc\u666f\u548c\u5148\u9a8c\u7f51\u7edc\u7684\u884c\u5217\u5bf9\u9f50\uff0c\u518d\u8ba8\u8bba\u54ea\u4e2a\u914d\u4f53\u6700\u80fd\u89e3\u91ca\u8fd9\u4efd\u54cd\u5e94\u3002<\/p>\n<h2 style=\"margin:2em 0 .6em;color:#205CAC;font-size:1.38em;line-height:1.5;\">nichenetr \u7684\u8f93\u5165\u548c\u5206\u6790\u5bf9\u8c61<\/h2>\n<p style=\"margin:.5em 0 1em\">targets \u662f\u63a5\u6536\u7ec6\u80de\u54cd\u5e94\u57fa\u56e0\uff0cbackground \u4e3a\u540c\u4e00\u63a5\u6536\u7c7b\u578b\u53ef\u68c0\u6d4b\u4e14\u53c2\u4e0e\u54cd\u5e94\u68c0\u9a8c\u7684\u57fa\u56e0\u3002lt \u662f\u57fa\u56e0\u00d7\u914d\u4f53\u7684\u5148\u9a8c\u77e9\u9635\uff0cligands \u4e3a\u8868\u8fbe\u6761\u4ef6\u5408\u683c\u5019\u9009\u3002<\/p>\n<p style=\"margin:.5em 0 1em\">\u63a5\u6536\u7ec6\u80de\u80cc\u666f\u57fa\u56e0\u7684\u9009\u62e9\u5bf9\u914d\u4f53\u6d3b\u6027\u8bc4\u5206\u7684\u89e3\u91ca\u529b\u5177\u6709\u51b3\u5b9a\u6027\u5f71\u54cd\u3002\u82e5\u80cc\u666f\u57fa\u56e0\u9009\u53d6\u4e0d\u5f53\uff0c\u4f8b\u5982\u5c06\u5168\u57fa\u56e0\u7ec4\u4f5c\u4e3a\u80cc\u666f\uff0c\u4f1a\u5bfc\u81f4\u8bc4\u5206\u7ed3\u679c\u5931\u53bb\u751f\u7269\u5b66\u610f\u4e49\uff0c\u56e0\u4e3a\u8bc4\u5206\u673a\u5236\u4f9d\u8d56\u4e8e\u57fa\u56e0\u8868\u8fbe\u6c34\u5e73\u548c\u6f5c\u5728\u9776\u6807\u4e4b\u95f4\u7684\u7edf\u8ba1\u5173\u7cfb\u3002\u5728NicheNet\u5206\u6790\u4e2d\uff0c\u80cc\u666f\u57fa\u56e0\u5e94\u9650\u5b9a\u4e3a\u63a5\u6536\u7ec6\u80de\u7c7b\u578b\u4e2d\u53ef\u68c0\u6d4b\u4e14\u53c2\u4e0e\u54cd\u5e94\u68c0\u9a8c\u7684\u57fa\u56e0\u96c6\u5408\uff0c\u4ee5\u786e\u4fdd\u8bc4\u5206\u7684\u5408\u7406\u6027\u548c\u53ef\u6bd4\u6027\u3002\u8fd9\u79cd\u8bbe\u5b9a\u80fd\u907f\u514d\u56e0\u57fa\u56e0\u8868\u8fbe\u80cc\u666f\u4e0d\u4e00\u81f4\u800c\u5bfc\u81f4\u7684\u8bc4\u5206\u504f\u5dee\uff0c\u4f7f\u5f97\u6700\u7ec8\u7684\u914d\u4f53\u6d3b\u6027\u6392\u540d\u66f4\u8d34\u8fd1\u5b9e\u9645\u751f\u7269\u5b66\u8fc7\u7a0b\u3002<\/p>\n<p style=\"margin:.5em 0 1em\">\u5148\u9a8c\u914d\u4f53\u9776\u57fa\u56e0\u77e9\u9635\u662f\u8ba1\u7b97\u914d\u4f53\u6d3b\u6027\u8bc4\u5206\u7684\u4f9d\u636e\uff0c\u5176\u5185\u5bb9\u5fc5\u987b\u4e0e\u63a5\u6536\u7ec6\u80de\u7c7b\u578b\u548c\u7269\u79cd\u4e00\u81f4\u3002\u5728\u5206\u6790\u4e2d\uff0c\u63a5\u6536\u7ec6\u80de\u7684\u54cd\u5e94\u57fa\u56e0\u9700\u4e0e\u5148\u9a8c\u77e9\u9635\u4e2d\u7684\u57fa\u56e0\u540d\u8fdb\u884c\u5339\u914d\uff0c\u82e5\u5b58\u5728\u4e0d\u4e00\u81f4\u7684\u57fa\u56e0\uff0c\u5c06\u5bfc\u81f4\u8bc4\u5206\u7ed3\u679c\u4e0d\u51c6\u786e\u3002\u80cc\u666f\u57fa\u56e0\u96c6\u4e5f\u5e94\u4e0e\u5148\u9a8c\u77e9\u9635\u4e2d\u7684\u57fa\u56e0\u540d\u4fdd\u6301\u4e00\u81f4\uff0c\u4ee5\u786e\u4fdd\u8bc4\u5206\u7684\u903b\u8f91\u4e00\u81f4\u6027\u3002\u82e5\u80cc\u666f\u57fa\u56e0\u672a\u4e0e\u5148\u9a8c\u77e9\u9635\u5339\u914d\uff0c\u5c06\u5bfc\u81f4\u8bc4\u5206\u673a\u5236\u5931\u6548\uff0c\u65e0\u6cd5\u6b63\u786e\u53cd\u6620\u914d\u4f53\u7684\u6d3b\u6027\u6c34\u5e73\u3002<\/p>\n<p style=\"margin:.5em 0 1em\">\u5b9a\u4e49\u53d1\u9001\u7fa4\u3001\u63a5\u6536\u7fa4\u3001\u5019\u9009\u914d\u4f53\u3001\u63a5\u6536\u7fa4\u54cd\u5e94\u57fa\u56e0\u53ca\u8868\u8fbe\u80cc\u666f\uff0c\u7528 <code>predict_ligand_activities()<\/code> \u4e0e\u5148\u9a8c\u914d\u4f53\u2013\u9776\u57fa\u56e0\u77e9\u9635\u8ba1\u7b97\u6392\u540d\u3002 <a href=\"https:\/\/github.com\/saeyslab\/nichenetr\/blob\/master\/vignettes\/seurat_steps.md\" style=\"color:#185CB7;text-decoration:underline;\">nichenetr \u4f5c\u8005\u6559\u7a0b<\/a><\/p>\n<pre style=\"white-space:pre;overflow:auto;max-width:100%;padding:14px;background:#F0F7FF;border:1px solid #D1E7FF;border-radius:8px;color:#183551;font-size:14px;line-height:1.6;box-sizing:border-box;\"><code class=\"language-r\" style=\"font-family:Consolas,monospace;white-space:pre;overflow-wrap:normal;word-break:normal;\">bg &lt;- intersect(background, rownames(lt))\na &lt;- nichenetr::predict_ligand_activities(geneset = intersect(targets,bg), background_expressed_genes = bg, ligand_target_matrix = lt, potential_ligands = intersect(ligands,colnames(lt)))\nhead(a)\n<\/code><\/pre>\n<h2 style=\"margin:2em 0 .6em;color:#205CAC;font-size:1.38em;line-height:1.5;\">\u66f4\u6362\u80cc\u666f\uff0c\u968f\u673a\u547d\u4e2d\u7684\u57fa\u7ebf\u4e5f\u53d8\u5316<\/h2>\n<p style=\"margin:.5em 0 1em\">\u6559\u5b66\u8bbe\u5b9a\u4ece\u80cc\u666f\u62bd\u4e8c\u5341\u4e2a\u57fa\u56e0\uff0c\u5341\u4e2a\u5df2\u6807\u4f5c\u76ee\u6807\uff0c\u5206\u522b\u5728\u4e00\u5343\u6216\u4e00\u767e\u4e2a\u53ef\u62bd\u57fa\u56e0\u4e2d\u8ba1\u7b97\u671f\u671b\u4ea4\u96c6\uff0c\u5e76\u7ed9\u51fa\u56db\u4e2a\u89c2\u5bdf\u547d\u4e2d\u3002\u793a\u610f\u53ef\u9009\u7a7a\u95f4\u6539\u53d8\u57fa\u7ebf\uff0c\u4e0d\u662f NicheNet \u7b97\u6cd5\u6216\u6d3b\u52a8\u8bc4\u5206\u3002<\/p>\n<pre style=\"white-space:pre;overflow:auto;max-width:100%;padding:14px;background:#F0F7FF;border:1px solid #D1E7FF;border-radius:8px;color:#183551;font-size:14px;line-height:1.6;box-sizing:border-box;\"><code class=\"language-r\" style=\"font-family:Consolas,monospace;white-space:pre;overflow-wrap:normal;word-break:normal;\">v &lt;- c(20*10\/1000,20*10\/100,4)\nnames(v) &lt;- c(\"\u5168\u5e93\u80cc\u666f\", \"\u63a5\u6536\u7fa4\u80cc\u666f\", \"\u89c2\u5bdf\u5230\")\nprint(v)\n<\/code><\/pre>\n<table style=\"width:100%;border-collapse:collapse;margin:1em 0;font-size:15px\">\n<thead>\n<tr>\n<th style=\"border-bottom:1px solid #CBDEEB;text-align:left;padding:8px;background:#ECF6FF;\">\u8f93\u5165\u6216\u6bd4\u8f83\u9879<\/th>\n<th style=\"border-bottom:1px solid #CBDEEB;text-align:left;padding:8px;background:#ECF6FF;\">R \u8ba1\u7b97\u7ed3\u679c<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #CBDEEB;text-align:left;padding:8px;background:#FFF;\">\u5168\u5e93\u80cc\u666f<\/td>\n<td style=\"border-bottom:1px solid #CBDEEB;text-align:left;padding:8px;background:#FFF;\">0.2<\/td>\n<\/tr>\n<tr>\n<td style=\"border-bottom:1px solid #CBDEEB;text-align:left;padding:8px;background:#FFF;\">\u63a5\u6536\u7fa4\u80cc\u666f<\/td>\n<td style=\"border-bottom:1px solid #CBDEEB;text-align:left;padding:8px;background:#FFF;\">2<\/td>\n<\/tr>\n<tr>\n<td style=\"border-bottom:1px solid #CBDEEB;text-align:left;padding:8px;background:#FFF;\">\u89c2\u5bdf\u5230<\/td>\n<td style=\"border-bottom:1px solid #CBDEEB;text-align:left;padding:8px;background:#FFF;\">4<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<figure style=\"margin:1.5em 0;\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2026\/11\/r-guide-nichenetr-practice-9f477fd4.png?resize=1120%2C690&#038;ssl=1\" alt=\"\u66f4\u6362\u80cc\u666f\uff0c\u968f\u673a\u547d\u4e2d\u7684\u57fa\u7ebf\u4e5f\u53d8\u5316\u3002\u5168\u5e93\u80cc\u666f 0.2\uff0c\u63a5\u6536\u7fa4\u80cc\u666f 2\uff0c\u89c2\u5bdf\u5230 4\u3002\" width=\"1120\" height=\"690\" style=\"max-width:100%;width:100%;height:auto;display:block\"><figcaption style=\"font-size:14px;color:#455970;line-height:1.6;\">\u6559\u5b66\u7b97\u4f8b\uff0c\u6570\u636e\u4e0e\u8ba1\u7b97\u5f0f\u89c1\u56fe\u4e0a\u65b9\u3002<\/figcaption><\/figure>\n<h2 style=\"margin:2em 0 .6em;color:#205CAC;font-size:1.38em;line-height:1.5;\">\u5019\u9009\u9776\u57fa\u56e0\u5230\u5e95\u6709\u6ca1\u6709\u673a\u4f1a\u88ab\u9009\u5165\uff1f<\/h2>\n<p style=\"margin:.5em 0 1em\">\u4e09\u4e2a\u54cd\u5e94\u5019\u9009\u4e2d\u53ea\u6709\u524d\u4e24\u4e2a\u6210\u529f\u8fdb\u5165\u53ef\u68c0\u9a8c\u80cc\u666f\u3002\u5bf9\u4e8e\u7b2c\u4e09\u4e2a\uff0c\u5148\u533a\u5206\u57fa\u56e0\u540d\u6620\u5c04\u5931\u8d25\u3001\u63a5\u6536\u7ec6\u80de\u65e0\u8868\u8fbe\u6216\u6839\u672c\u6ca1\u6709\u63a5\u53d7\u54cd\u5e94\u68c0\u9a8c\u3002\u76f4\u63a5\u8865\u8fdb\u80cc\u666f\u4f1a\u6539\u53d8\u9634\u6027\u96c6\u5408\uff0c\u5e76\u4e14\u63a9\u76d6\u8868\u5b9e\u9645\u6765\u81ea\u54ea\u4e00\u8f6e\u7b5b\u9009\u3002<\/p>\n<pre style=\"white-space:pre;overflow:auto;max-width:100%;padding:14px;background:#F0F7FF;border:1px solid #D1E7FF;border-radius:8px;color:#183551;font-size:14px;line-height:1.6;box-sizing:border-box;\"><code class=\"language-r\" style=\"font-family:Consolas,monospace;white-space:pre;overflow-wrap:normal;word-break:normal;\">obs &lt;- c(\"g2\",\"g3\",\"g9\")\neligible &lt;- c(\"g1\",\"g2\",\"g3\",\"g4\")\nlist(use=intersect(obs,eligible),miss=setdiff(obs,eligible))\n<\/code><\/pre>\n<p style=\"margin:.5em 0 1em\">\u5148\u9a8c\u914d\u4f53\u9776\u57fa\u56e0\u77e9\u9635\u7684\u9009\u53d6\u4e5f\u5bf9\u8bc4\u5206\u7ed3\u679c\u6709\u91cd\u8981\u5f71\u54cd\u3002\u82e5\u77e9\u9635\u4e0e\u63a5\u6536\u7ec6\u80de\u7c7b\u578b\u4e0d\u4e00\u81f4\uff0c\u5c06\u5bfc\u81f4\u8bc4\u5206\u7ed3\u679c\u504f\u79bb\u5b9e\u9645\u751f\u7269\u5b66\u8fc7\u7a0b\u3002\u5728\u5206\u6790\u4e2d\uff0c\u5e94\u786e\u4fdd\u77e9\u9635\u4e2d\u7684\u57fa\u56e0\u4e0e\u63a5\u6536\u7ec6\u80de\u7684\u54cd\u5e94\u57fa\u56e0\u4e00\u81f4\uff0c\u4e14\u914d\u4f53\u4fe1\u606f\u4e0e\u5019\u9009\u914d\u4f53\u4e00\u81f4\u3002\u82e5\u77e9\u9635\u4e0d\u5339\u914d\uff0c\u5e94\u66f4\u6362\u4e3a\u63a5\u6536\u7ec6\u80de\u7c7b\u578b\u7279\u5f02\u7684\u77e9\u9635\uff0c\u4ee5\u786e\u4fdd\u8bc4\u5206\u7684\u751f\u7269\u5b66\u610f\u4e49\u3002\u8fd9\u79cd\u4e00\u81f4\u6027\u662f\u5206\u6790\u7ed3\u679c\u89e3\u91ca\u529b\u7684\u4fdd\u969c\uff0c\u4e5f\u662f\u7814\u7a76\u7ed3\u8bba\u53ef\u4fe1\u5ea6\u7684\u57fa\u7840\u3002<\/p>\n<p style=\"margin:.5em 0 1em\">\u5728NicheNet\u5206\u6790\u4e2d\uff0c\u82e5\u63a5\u6536\u7ec6\u80de\u80cc\u666f\u57fa\u56e0\u672a\u9650\u5b9a\u5728\u7279\u5b9a\u7c7b\u578b\u4e2d\uff0c\u800c\u4f7f\u7528\u5168\u57fa\u56e0\u7ec4\u4f5c\u4e3a\u80cc\u666f\uff0c\u4f1a\u5bfc\u81f4\u8bc4\u5206\u673a\u5236\u504f\u79bb\u751f\u7269\u5b66\u5b9e\u9645\u3002\u8fd9\u79cd\u8bbe\u5b9a\u4e0b\uff0c\u8bc4\u5206\u7684\u57fa\u7ebf\u6c34\u5e73\u88ab\u9519\u8bef\u62c9\u9ad8\u6216\u62c9\u4f4e\uff0c\u4f7f\u5f97\u914d\u4f53\u6d3b\u6027\u6392\u5e8f\u5931\u53bb\u89e3\u91ca\u529b\u3002\u4f8b\u5982\uff0c\u82e5\u80cc\u666f\u57fa\u56e0\u4e2d\u5305\u542b\u5927\u91cf\u975e\u63a5\u6536\u7ec6\u80de\u7279\u5f02\u8868\u8fbe\u7684\u57fa\u56e0\uff0c\u5c06\u5bfc\u81f4\u76ee\u6807\u57fa\u56e0\u4e0e\u80cc\u666f\u57fa\u56e0\u7684\u4ea4\u96c6\u504f\u5c0f\uff0c\u4ece\u800c\u5f71\u54cd\u8bc4\u5206\u7684\u7edf\u8ba1\u663e\u8457\u6027\u3002\u8fd9\u79cd\u504f\u5dee\u5728\u7ed3\u679c\u4e2d\u8868\u73b0\u4e3a\u914d\u4f53\u6d3b\u6027\u8bc4\u5206\u7684\u5f02\u5e38\u6ce2\u52a8\uff0c\u4f7f\u5f97\u6392\u540d\u9760\u524d\u7684\u914d\u4f53\u96be\u4ee5\u4e0e\u5b9e\u9645\u54cd\u5e94\u673a\u5236\u5bf9\u5e94\u3002<\/p>\n<p style=\"margin:.5em 0 1em\">\u5f53\u51fa\u73b0\u8bc4\u5206\u7ed3\u679c\u4e0d\u5408\u7406\u65f6\uff0c\u5e94\u9996\u5148\u68c0\u67e5\u54cd\u5e94\u57fa\u56e0\u96c6\u4e0e\u80cc\u666f\u57fa\u56e0\u96c6\u7684\u4ea4\u96c6\u662f\u5426\u6709\u6548\u3002\u82e5\u4ea4\u96c6\u4e3a\u7a7a\u6216\u6781\u5c0f\uff0c\u8bf4\u660e\u57fa\u56e0\u540d\u5339\u914d\u5931\u8d25\u6216\u80cc\u666f\u57fa\u56e0\u672a\u8986\u76d6\u54cd\u5e94\u57fa\u56e0\u3002\u6b64\u65f6\u5e94\u91cd\u65b0\u6838\u5bf9\u57fa\u56e0\u540d\uff0c\u786e\u4fdd\u4e24\u8005\u5747\u6765\u81ea\u540c\u4e00\u7269\u79cd\u4e14\u683c\u5f0f\u4e00\u81f4\u3002\u82e5\u57fa\u56e0\u540d\u5339\u914d\u65e0\u8bef\uff0c\u5e94\u8fdb\u4e00\u6b65\u786e\u8ba4\u5148\u9a8c\u914d\u4f53\u9776\u57fa\u56e0\u77e9\u9635\u662f\u5426\u4e0e\u63a5\u6536\u7ec6\u80de\u7c7b\u578b\u5339\u914d\u3002\u82e5\u77e9\u9635\u4e2d\u4e0d\u5305\u542b\u54cd\u5e94\u57fa\u56e0\uff0c\u5c06\u5bfc\u81f4\u8bc4\u5206\u903b\u8f91\u9519\u8bef\uff0c\u9700\u66f4\u6362\u4e3a\u63a5\u6536\u7ec6\u80de\u7279\u5f02\u7684\u77e9\u9635\u3002<\/p>\n<h2 style=\"margin:2em 0 .6em;color:#205CAC;font-size:1.38em;line-height:1.5;\">\u7528\u7ed9\u5b9a\u5148\u9a8c\u77e9\u9635\u6bd4\u8f83\u4e24\u4e2a\u5019\u9009\u914d\u4f53<\/h2>\n<pre style=\"white-space:pre;overflow:auto;max-width:100%;padding:14px;background:#F0F7FF;border:1px solid #D1E7FF;border-radius:8px;color:#183551;font-size:14px;line-height:1.6;box-sizing:border-box;\"><code class=\"language-r\" style=\"font-family:Consolas,monospace;white-space:pre;overflow-wrap:normal;word-break:normal;\">lt &lt;- matrix(c(.9,.8,.7,.1,.05,.02,.1,.2,.3,.4,.5,.6),6,2,dimnames=list(paste0(\"g\",1:6),c(\"L1\",\"L2\")))\nz &lt;- nichenetr::predict_ligand_activities(geneset=rownames(lt)[1:3],background_expressed_genes=rownames(lt),ligand_target_matrix=lt,potential_ligands=colnames(lt))\nc(nrow(z),match(z$test_ligand[which.max(z$pearson)],colnames(lt)),max(z$pearson))\n<\/code><\/pre>\n<p style=\"margin:.5em 0 1em\">\u5728 R 4.5.2\u3001nichenetr 2.2.1.1 \u4e2d\u8fd0\u884c\uff0c\u8f93\u51fa\u4f9d\u6b21\u4e3a\u5019\u9009\u914d\u4f53 2\uff0c\u6392\u524d\u7684\u914d\u4f53\u7f16\u53f7 1\uff0c\u6700\u9ad8\u76f8\u5173 0.99\u3002<\/p>\n<h2 style=\"margin:2em 0 .6em;color:#205CAC;font-size:1.38em;line-height:1.5;\">\u9047\u5230\u5f02\u5e38\uff0c\u5148\u6838\u5bf9\u54ea\u4e00\u9879<\/h2>\n<p style=\"margin:.5em 0 1em\">\u628a\u5168\u57fa\u56e0\u7ec4\u5f53\u80cc\u666f\u4f1a\u6539\u53d8\u6253\u5206\u542b\u4e49\u3002\u80cc\u666f\u5e94\u6765\u81ea\u63a5\u6536\u7fa4\u4e2d\u53ef\u68c0\u6d4b\u4e14\u8fdb\u5165\u5206\u6790\u7684\u57fa\u56e0\uff0c\u5e76\u6838\u5bf9\u7269\u79cd\u4e0e\u57fa\u56e0\u540d\u3002<\/p>\n<p style=\"margin:.5em 0 1em\">\u53c2\u6570\u8c03\u6574\u8fd8\u53ef\u7528\u4e8e\u9a8c\u8bc1\u914d\u4f53\u6d3b\u6027\u8bc4\u5206\u7684\u751f\u7269\u5b66\u89e3\u91ca\u529b\u3002\u82e5\u4e3b\u7ed3\u8bba\u5728\u4e0d\u540c\u53c2\u6570\u8bbe\u5b9a\u4e0b\u4fdd\u6301\u4e00\u81f4\uff0c\u8bf4\u660e\u8bc4\u5206\u673a\u5236\u80fd\u7a33\u5b9a\u53cd\u6620\u63a5\u6536\u7ec6\u80de\u5bf9\u5019\u9009\u914d\u4f53\u7684\u54cd\u5e94\u80fd\u529b\u3002\u4f8b\u5982\uff0c\u5c06\u80cc\u666f\u57fa\u56e0\u96c6\u9650\u5b9a\u4e3a\u63a5\u6536\u7ec6\u80de\u7279\u5f02\u8868\u8fbe\u57fa\u56e0\uff0c\u89c2\u5bdf\u914d\u4f53\u6d3b\u6027\u8bc4\u5206\u662f\u5426\u4e0e\u5148\u9a8c\u7f51\u7edc\u4e00\u81f4\u3002\u82e5\u8bc4\u5206\u7ed3\u679c\u4e0e\u9884\u671f\u4e00\u81f4\uff0c\u8bf4\u660e\u5206\u6790\u7ed3\u679c\u5177\u6709\u751f\u7269\u5b66\u610f\u4e49\u3002\u82e5\u7ed3\u679c\u4e0d\u4e00\u81f4\uff0c\u5219\u9700\u91cd\u65b0\u8bc4\u4f30\u5206\u6790\u6d41\u7a0b\u4e2d\u7684\u6bcf\u4e00\u6b65\uff0c\u786e\u8ba4\u662f\u5426\u5b58\u5728\u5176\u4ed6\u53d8\u91cf\u5f71\u54cd\u8bc4\u5206\u3002\u8fd9\u79cd\u5bf9\u7167\u5206\u6790\u6709\u52a9\u4e8e\u660e\u786e\u5206\u6790\u7ed3\u679c\u7684\u8fb9\u754c\u6761\u4ef6\u3002<\/p>\n<p style=\"margin:.5em 0 1em\">\u5728NicheNet\u5206\u6790\u4e2d\uff0c\u63a5\u6536\u7ec6\u80de\u80cc\u666f\u57fa\u56e0\u96c6\u7684\u8bbe\u5b9a\u76f4\u63a5\u5f71\u54cd\u8bc4\u5206\u673a\u5236\u7684\u7edf\u8ba1\u57fa\u7840\u3002\u82e5\u80cc\u666f\u57fa\u56e0\u672a\u9650\u5b9a\u5728\u63a5\u6536\u7ec6\u80de\u7c7b\u578b\u4e2d\uff0c\u800c\u4f7f\u7528\u5168\u57fa\u56e0\u7ec4\u4f5c\u4e3a\u53c2\u8003\uff0c\u5c06\u4f7f\u8bc4\u5206\u7684\u57fa\u7ebf\u6c34\u5e73\u5931\u53bb\u751f\u7269\u5b66\u610f\u4e49\u3002\u8fd9\u79cd\u8bbe\u5b9a\u4e0b\uff0c\u8bc4\u5206\u7ed3\u679c\u4f1a\u56e0\u57fa\u56e0\u8868\u8fbe\u80cc\u666f\u7684\u6539\u53d8\u800c\u53d1\u751f\u504f\u79fb\uff0c\u4f7f\u5f97\u914d\u4f53\u6d3b\u6027\u6392\u5e8f\u96be\u4ee5\u53cd\u6620\u771f\u5b9e\u7684\u7ec6\u80de\u54cd\u5e94\u8fc7\u7a0b\u3002\u4f8b\u5982\uff0c\u5f53\u80cc\u666f\u57fa\u56e0\u4e2d\u6df7\u5165\u5927\u91cf\u975e\u63a5\u6536\u7ec6\u80de\u7279\u5f02\u8868\u8fbe\u7684\u57fa\u56e0\u65f6\uff0c\u76ee\u6807\u57fa\u56e0\u4e0e\u80cc\u666f\u57fa\u56e0\u7684\u4ea4\u96c6\u4f1a\u663e\u8457\u51cf\u5c11\uff0c\u4ece\u800c\u5f71\u54cd\u8bc4\u5206\u7684\u7edf\u8ba1\u663e\u8457\u6027\u3002\u8fd9\u79cd\u504f\u5dee\u4f1a\u5bfc\u81f4\u8bc4\u5206\u7ed3\u679c\u51fa\u73b0\u5f02\u5e38\u6ce2\u52a8\uff0c\u96be\u4ee5\u8bc6\u522b\u771f\u6b63\u5177\u6709\u529f\u80fd\u610f\u4e49\u7684\u914d\u4f53\u3002<\/p>\n<h2 style=\"margin:2em 0 .6em;color:#205CAC;font-size:1.38em;line-height:1.5;\">\u5982\u4f55\u7528\u81ea\u5df1\u7684\u6570\u636e\u590d\u6838<\/h2>\n<p style=\"margin:.5em 0 1em\">\u53ef\u7ed9\u6bcf\u4e2a\u5019\u9009\u914d\u4f53\u7559\u4e0b\u4e09\u4e2a\u53ef\u67e5\u7684\u540d\u5355\uff0c\u4f9d\u6b21\u662f\u53d1\u9001\u7ec6\u80de\u6709\u8868\u8fbe\u7684\u914d\u4f53\u3001\u63a5\u6536\u7ec6\u80de\u6709\u8868\u8fbe\u53d7\u4f53\u5bf9\u5e94\u7684\u914d\u4f53\u3001\u5148\u9a8c\u77e9\u9635\u91cc\u6709\u5217\u7684\u914d\u4f53\u3002\u53d6\u4ea4\u96c6\u524d\u4fdd\u5b58\u6bcf\u6b65\u88ab\u5220\u7684\u540d\u5b57\u3002\u82e5\u4e00\u4e2a\u5f88\u5173\u5fc3\u7684\u56e0\u5b50\u6ca1\u6709\u8fdb\u5165\u7ed3\u679c\uff0c\u5148\u67e5\u4e22\u5728\u54ea\u4e00\u6b65\uff0c\u518d\u8ba8\u8bba\u751f\u7269\u5b66\u3002\u5bf9\u80cc\u666f\u57fa\u56e0\u4e5f\u540c\u6837\u8bb0\u5f55\u63a5\u6536\u7ec6\u80de\u53ef\u68c0\u6d4b\u7684\u4ea4\u96c6\uff0c\u82e5\u628a\u6d4b\u4e0d\u5230\u7684\u57fa\u56e0\u5927\u91cf\u52a0\u5165\u80cc\u666f\uff0c\u54cd\u5e94\u96c6\u5408\u4e0e\u5176\u4f59\u57fa\u56e0\u7684\u6bd4\u8f83\u6761\u4ef6\u4f1a\u6539\u53d8\u3002<\/p>\n<p style=\"margin:.5em 0 1em\">\u4ece\u51c6\u5907\u91cd\u70b9\u89e3\u91ca\u7684\u7c7b\u522b\u91cc\u9009\u4e09\u79cd\u4e0d\u540c\u4f4d\u7f6e\u7684\u89c2\u6d4b\u3002\u4e00\u79cd\u6700\u7b26\u5408\u8be5\u7c7b\u7279\u5f81\uff0c\u4e00\u79cd\u521a\u521a\u8de8\u8fc7\u5206\u7c7b\u6216\u7b5b\u9009\u8fb9\u754c\uff0c\u4e00\u79cd\u4e0e\u90bb\u8fd1\u7c7b\u578b\u5bb9\u6613\u6df7\u6dc6\u3002\u5206\u522b\u7559\u4e0b\u539f\u59cb\u8ba1\u6570\u6216\u539f\u59cb\u6d4b\u91cf\u3001\u6240\u5c5e\u6837\u672c\u3001\u51b3\u5b9a\u5b83\u5f52\u5c5e\u7684\u90a3\u6761\u8bc1\u636e\u3002\u5bf9\u8fb9\u754c\u5bf9\u8c61\uff0c\u518d\u9009\u4e00\u4e2a\u4f1a\u652f\u6301\u76f8\u53cd\u89e3\u91ca\u7684\u72ec\u7acb\u6807\u5fd7\u3002\u82e5\u8fd9\u4e2a\u6807\u5fd7\u53ea\u5728\u51e0\u6761\u4f4e\u8d28\u91cf\u8bb0\u5f55\u4e2d\u68c0\u51fa\uff0c\u4e0e\u5728\u591a\u4f4d\u4f9b\u4f53\u4e2d\u540c\u65f6\u68c0\u51fa\uff0c\u540e\u7eed\u8981\u67e5\u7684\u662f\u4e24\u4ef6\u4e0d\u540c\u7684\u4e8b\u3002<\/p>\n<p style=\"margin:.5em 0 1em\">\u6b63\u5f0f\u62a5\u544a\u6837\u672c\u6784\u6210\u65f6\uff0c\u6bcf\u4f4d\u4f9b\u4f53\u5355\u5217\u4e00\u884c\uff0c\u540c\u65f6\u8bb0\u4e0b\u901a\u8fc7\u8d28\u63a7\u4e14\u80fd\u53c2\u4e0e\u8fd9\u4e00\u6b65\u7684\u603b\u6570\u3002\u5047\u5982\u9ad8\u5206\u5bf9\u8c61\u51e0\u4e4e\u90fd\u6765\u81ea\u4e00\u4f4d\u53d7\u8bd5\u8005\uff0c\u5e94\u628a\u8fd9\u4f4d\u53d7\u8bd5\u8005\u7684\u6587\u5e93\u6df1\u5ea6\u3001\u5904\u7406\u65e5\u671f\u548c\u7ec4\u7ec7\u6765\u6e90\u53d6\u51fa\u6765\uff0c\u4e0e\u5176\u4f59\u6837\u672c\u5e76\u5217\u6838\u5bf9\u3002\u82e5\u53e6\u4e00\u6279\u72ec\u7acb\u8d44\u6599\u4e2d\u7f3a\u5c11\u540c\u7c7b\u89c2\u6d4b\uff0c\u4fdd\u7559\u8fd9\u6b21\u53ef\u89c1\u7684\u8bc1\u636e\uff0c\u5e76\u628a\u63a8\u65ad\u8303\u56f4\u6536\u56de\u5230\u539f\u6765\u7684\u6837\u672c\u96c6\u5408\u3002\u8fd9\u6837\u7684\u8bb0\u5f55\u4e5f\u80fd\u5e2e\u52a9\u4e0b\u4e00\u4f4d\u5408\u4f5c\u8005\u6709\u9488\u5bf9\u6027\u5730\u8865\u505a\u67d3\u8272\u3001\u7a7a\u95f4\u5b9a\u4f4d\u6216\u989d\u5916\u53d6\u6837\u3002<\/p>\n<h2 style=\"margin:2em 0 .6em;color:#205CAC;font-size:1.38em;line-height:1.5;\">\u4e0b\u8f7d\u4ee3\u7801\u548c\u793a\u4f8b\u6570\u636e\uff0c\u5728 Linux \u4e0a\u590d\u73b0<\/h2>\n<p style=\"margin:.5em 0 1em\"><a style=\"color:#1458a5;text-decoration:underline;\" href=\"https:\/\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/r-practice-labs\/012-nichenetr-code-3113d1cfa622490d.zip\">\u4e0b\u8f7d\u672c\u7bc7 R \u4ee3\u7801\uff08ZIP\uff0c6.0 KiB\uff09<\/a> \u00b7 <a style=\"color:#1458a5;text-decoration:underline;\" href=\"https:\/\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/r-practice-labs\/012-nichenetr-data-ecf04500c313033e.zip\">\u4e0b\u8f7d\u914d\u5957\u793a\u4f8b\u6570\u636e\uff08ZIP\uff0c968 B\uff09<\/a><\/p>\n<p style=\"margin:.5em 0 1em\">\u5c06\u4e24\u4e2a ZIP \u89e3\u538b\u5230\u540c\u4e00\u4f4d\u7f6e\uff0c\u8fdb\u5165 <code style=\"background:#edf5fc;padding:.05em .25em;border-radius:3px;\">012-nichenetr<\/code> \u76ee\u5f55\uff0c\u8fd0\u884c <code style=\"background:#edf5fc;padding:.05em .25em;border-radius:3px;\">Rscript --vanilla run.R<\/code>\u3002\u6253\u5f00 <code style=\"background:#edf5fc;padding:.05em .25em;border-radius:3px;\">results\/metrics.tsv<\/code> \u67e5\u770b\u7ed3\u679c\uff0c\u4ee3\u7801\u5305\u4e2d\u7684 <code style=\"background:#edf5fc;padding:.05em .25em;border-radius:3px;\">expected\/metrics.tsv<\/code> \u53ef\u4f9b\u9010\u884c\u6838\u5bf9\u3002\u8981\u91cd\u505a\u6587\u4e2d\u7684\u4e24\u4e2a\u6570\u503c\u7ec3\u4e60\uff0c\u53ef\u7ee7\u7eed\u8fd0\u884c <code style=\"background:#edf5fc;padding:.05em .25em;border-radius:3px;\">Rscript --vanilla checks.R<\/code>\u3002<\/p>\n<p style=\"margin:.5em 0 1em\">\u672c\u6b21\u4ece\u4e0b\u8f7d\u5305\u590d\u73b0\u7684\u6b65\u9aa4\u662f\u201c\u7528\u7ed9\u5b9a\u5148\u9a8c\u77e9\u9635\u6bd4\u8f83\u4e24\u4e2a\u5019\u9009\u914d\u4f53\u201d\u3002Linux x86_64\u3001R 4.5.2\u3001nichenetr 2.2.1.1 \u7684\u8f93\u51fa\u4e3a\u5019\u9009\u914d\u4f53 2\uff0c\u6392\u524d\u7684\u914d\u4f53\u7f16\u53f7 1\uff0c\u6700\u9ad8\u76f8\u5173 0.98625269\u3002<\/p>\n<p style=\"margin:.5em 0 1em\">\u5728\u76f8\u540c\u5148\u9a8c\u77e9\u9635\u4e0a\uff0c\u56fa\u5b9a\u4e09\u4e2a\u54cd\u5e94\u57fa\u56e0\uff0c\u4ec5\u5c06\u80cc\u666f\u7f29\u4e3a\u63a5\u6536\u7ec6\u80de\u786e\u5b9e\u53ef\u6d4b\u7684\u4ea4\u96c6\uff0c\u518d\u6bd4\u8f83\u4e24\u4e2a\u5019\u9009\u914d\u4f53\u7684\u6392\u5e8f\u3002\u4fdd\u5b58\u6539\u52a8\u524d\u540e\u7684\u80cc\u666f\u540d\u5355\uff0c\u5426\u5219\u76f8\u5173\u503c\u7684\u53d8\u5316\u65e0\u6cd5\u8ffd\u6eaf\u5230\u54ea\u4e9b\u57fa\u56e0\u53c2\u4e0e\u4e86\u6bd4\u8f83\u3002<\/p>\n<h2 style=\"margin:2em 0 .6em;color:#205CAC;font-size:1.38em;line-height:1.5;\">\u5b9e\u8dd1\u540e\u7684\u7ecf\u9a8c\u603b\u7ed3<\/h2>\n<p style=\"margin:.5em 0 1em\">\u771f\u5b9e\u8dd1\u914d\u4f53\u6d3b\u6027\u8bc4\u5206\u524d\uff0c\u5148\u786e\u4fdd\u77e9\u9635\u7684\u884c\u80fd\u8986\u76d6\u54cd\u5e94\u80cc\u666f\uff0c\u5217\u80fd\u8986\u76d6\u5019\u9009\u914d\u4f53\u3002\u7528\u4eba\u4e3a\u7ed9\u5b9a\u7684\u5148\u9a8c\u53ef\u4ee5\u6838\u5bf9\u8f93\u51fa\u540d\u6b21\u662f\u5426\u671d\u7740\u80fd\u89e3\u91ca\u54cd\u5e94\u57fa\u56e0\u7684\u65b9\u5411\u53d8\u5316\u3002\u5b83\u68c0\u9a8c\u7684\u662f\u6253\u5206\u8f93\u5165\u548c\u65b9\u5411\uff0c\u9884\u6d4b\u5728\u5355\u4e2a\u7ec4\u7ec7\u91cc\u7684\u901a\u4fe1\u4ecd\u9700\u72ec\u7acb\u8868\u8fbe\u3001\u7a7a\u95f4\u6216\u5e72\u9884\u8bc1\u636e\u3002<\/p>\n<p style=\"border-top:1px solid #DAE6F2;margin-top:2em;padding-top:1em;\">\u5c0f\u6837\u672c\u7684\u8ba1\u6570\u548c\u5224\u65ad\u6807\u51c6\u6838\u5bf9\u6e05\u695a\u540e\uff0c\u82e5\u8981\u628a\u540c\u4e00\u6d41\u7a0b\u7528\u4e8e\u6574\u6279\u6837\u672c\uff0c\u53ef\u4ee5\u5e26\u4e0a\u8f93\u5165\u89c4\u6a21\u548c\u5df2\u7ecf\u8dd1\u901a\u7684 R \u811a\u672c\uff0c\u6309\u9879\u76ee\u5468\u671f\u4f7f\u7528<a href=\"https:\/\/www.biocloudservice.com\/wordpress\/compute-services\/\" style=\"color:#185CB7;text-decoration:underline;\" data-ysx-event=\"contact_click\">\u4e91\u751f\u4fe1\u751f\u7269\u4fe1\u606f\u5b66\u5206\u6790\u670d\u52a1\u5668<\/a>\u3002<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u6559\u5b66\u8bbe\u5b9a\u4ece\u80cc\u666f\u62bd\u4e8c\u5341\u4e2a\u57fa\u56e0\uff0c\u5341\u4e2a\u5df2\u6807\u4f5c\u76ee\u6807\uff0c\u5206\u522b\u5728\u4e00\u5343\u6216\u4e00\u767e\u4e2a\u53ef\u62bd\u57fa\u56e0\u4e2d\u8ba1\u7b97\u671f\u671b\u4ea4\u96c6\uff0c\u5e76\u7ed9\u51fa\u56db\u4e2a\u89c2\u5bdf\u547d\u4e2d\u3002<\/p>\n","protected":false},"author":1,"featured_media":68851,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[1,71],"tags":[716,728,733],"class_list":["post-68853","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-part","category-single-cell","tag-nichenetr","tag-r","tag-733"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2026\/11\/r-guide-nichenetr-practice-9f477fd4.png?fit=1120%2C690&ssl=1","_links":{"self":[{"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/posts\/68853","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/comments?post=68853"}],"version-history":[{"count":2,"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/posts\/68853\/revisions"}],"predecessor-version":[{"id":70777,"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/posts\/68853\/revisions\/70777"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/media\/68851"}],"wp:attachment":[{"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/media?parent=68853"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/categories?post=68853"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/tags?post=68853"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}