{"id":68689,"date":"2026-12-06T09:01:26","date_gmt":"2026-12-06T01:01:26","guid":{"rendered":"https:\/\/www.biocloudservice.com\/wordpress\/?p=68689"},"modified":"2026-12-06T09:01:26","modified_gmt":"2026-12-06T01:01:26","slug":"r-guide-clusterprofiler-practice","status":"publish","type":"post","link":"https:\/\/www.biocloudservice.com\/wordpress\/r-guide-clusterprofiler-practice\/","title":{"rendered":"clusterProfiler \u505a GO \u5bcc\u96c6\uff0c\u80cc\u666f\u4e0d\u540c\u65f6\u4e24\u4e2a\u7ec6\u80de\u7fa4\u8fd8\u80fd\u76f4\u63a5\u6bd4\u5417\uff1f"},"content":{"rendered":"<div class=\"ysx-r-practice\" id=\"ysx-r-clusterprofiler\" 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\">\u4e24\u4e2a\u7ec6\u80de\u7fa4\u90fd\u547d\u4e2d\u4e86\u4e94\u4e2a\u514d\u75ab\u8fc7\u7a0b\u57fa\u56e0\u3002\u82e5\u4e00\u4e2a\u7fa4\u91cc\u539f\u672c\u53ef\u6d4b\u7684\u76f8\u5173\u57fa\u56e0\u5f88\u5c11\uff0c\u53e6\u4e00\u4e2a\u7fa4\u672c\u6765\u5c31\u6709\u4e00\u5927\u6279\uff0c\u4e94\u6b21\u547d\u4e2d\u7684\u610f\u4e49\u5e76\u4e0d\u76f8\u540c\u3002\u5bcc\u96c6\u5206\u6790\u9996\u5148\u8981\u56de\u7b54\u54ea\u4e9b\u57fa\u56e0\u771f\u6b63\u6709\u673a\u4f1a\u8fdb\u5165\u5019\u9009\u540d\u5355\u3002<\/p>\n<h2 style=\"margin:2em 0 .6em;color:#205CAC;font-size:1.38em;line-height:1.5;\">clusterProfiler \u7684\u8f93\u5165\u548c\u5206\u6790\u5bf9\u8c61<\/h2>\n<p style=\"margin:.5em 0 1em\">ids \u662f\u5019\u9009 ENTREZID\uff0cbg \u662f\u540c\u7fa4\u5b9e\u9645\u53ef\u53c2\u4e0e\u68c0\u9a8c\u7684\u80cc\u666f\u6807\u8bc6\u3002db \u4e3a\u76f8\u5e94\u7269\u79cd OrgDb \u5bf9\u8c61\u3002<\/p>\n<p style=\"margin:.5em 0 1em\">\u5728\u8fdb\u884c\u5bcc\u96c6\u5206\u6790\u524d\uff0c\u9700\u5bf9\u6bcf\u4e2a\u7ec6\u80de\u7fa4\u7684\u57fa\u56e0\u5217\u8868\u8fdb\u884c\u7edf\u4e00\u7684ID\u6620\u5c04\u3002\u8fd9\u4e00\u6b65\u9aa4\u786e\u4fdd\u6240\u6709\u57fa\u56e0\u5728\u540e\u7eed\u5206\u6790\u4e2d\u4f7f\u7528\u76f8\u540c\u7684\u6807\u8bc6\u7b26\uff0c\u907f\u514d\u56e0ID\u7c7b\u578b\u4e0d\u540c\u5bfc\u81f4\u7684\u9057\u6f0f\u6216\u91cd\u590d\u3002\u6620\u5c04\u540e\u7684\u57fa\u56e0\u5217\u8868\u5c06\u7528\u4e8e\u6784\u5efa\u6bcf\u4e2a\u7fa4\u7684\u80cc\u666f\u96c6\u5408\u3002\u80cc\u666f\u96c6\u5408\u7684\u5b9a\u4e49\u5e94\u57fa\u4e8e\u5b9e\u9645\u53c2\u4e0e\u5206\u6790\u7684\u57fa\u56e0\u8303\u56f4\uff0c\u800c\u4e0d\u662f\u7406\u8bba\u4e0a\u7684\u5168\u90e8\u57fa\u56e0\u3002\u4f8b\u5982\uff0c\u82e5\u67d0\u4e2a\u7ec6\u80de\u7fa4\u4e2d\u53ea\u6709\u90e8\u5206\u57fa\u56e0\u88ab\u6ce8\u91ca\u5230\u7279\u5b9a\u672c\u4f53\uff0c\u90a3\u4e48\u8be5\u7fa4\u7684\u80cc\u666f\u96c6\u5408\u5e94\u53ea\u5305\u62ec\u8fd9\u4e9b\u6ce8\u91ca\u57fa\u56e0\u3002\u82e5\u80cc\u666f\u8bbe\u7f6e\u4e0d\u5f53\uff0c\u5c06\u5bfc\u81f4\u5bcc\u96c6\u7ed3\u679c\u7684\u504f\u5dee\uff0c\u4f7f\u5f97\u67d0\u4e9b\u57fa\u56e0\u96c6\u7684\u5bcc\u96c6\u7a0b\u5ea6\u88ab\u9519\u8bef\u4f30\u8ba1\u3002<\/p>\n<p style=\"margin:.5em 0 1em\">\u5728\u5b9e\u9645\u64cd\u4f5c\u4e2d\uff0c\u6bcf\u4e2a\u7ec6\u80de\u7fa4\u7684\u80cc\u666f\u57fa\u56e0\u96c6\u5408\u53ef\u80fd\u5dee\u5f02\u8f83\u5927\uff0c\u56e0\u6b64\u9700\u8981\u4e3a\u6bcf\u7ec4\u5355\u72ec\u8bbe\u7f6e\u5408\u9002\u7684\u80cc\u666f\u3002\u80cc\u666f\u57fa\u56e0\u96c6\u5408\u7684\u5927\u5c0f\u76f4\u63a5\u5f71\u54cd\u5bcc\u96c6\u5206\u6790\u4e2d\u7684\u8d85\u51e0\u4f55\u5206\u5e03\u8ba1\u7b97\u3002\u5f53\u4e24\u4e2a\u7ec6\u80de\u7fa4\u7684\u80cc\u666f\u57fa\u56e0\u6570\u91cf\u4e0d\u4e00\u81f4\u65f6\uff0c\u5373\u4f7f\u57fa\u56e0\u5217\u8868\u4e2d\u5b58\u5728\u76f8\u540c\u7684\u57fa\u56e0\uff0c\u5176\u5bcc\u96c6\u7ed3\u679c\u4e5f\u53ef\u80fd\u4e0d\u540c\u3002\u4f8b\u5982\uff0c\u82e5\u4e00\u4e2a\u7ec6\u80de\u7fa4\u7684\u80cc\u666f\u57fa\u56e0\u67091000\u4e2a\uff0c\u53e6\u4e00\u4e2a\u6709200\u4e2a\uff0c\u5373\u4f7f\u4e24\u8005\u90fd\u5305\u542b50\u4e2a\u76ee\u6807\u57fa\u56e0\uff0c\u5176\u5bcc\u96c6\u7ed3\u679c\u7684\u663e\u8457\u6027\u4e5f\u4f1a\u56e0\u80cc\u666f\u4e0d\u540c\u800c\u4ea7\u751f\u5dee\u5f02\u3002\u56e0\u6b64\uff0c\u4e3a\u4fdd\u8bc1\u6bd4\u8f83\u7684\u516c\u5e73\u6027\uff0c\u5e94\u786e\u4fdd\u6bcf\u4e2a\u7ec6\u80de\u7fa4\u4f7f\u7528\u5176\u5b9e\u9645\u53ef\u53c2\u4e0e\u5206\u6790\u7684\u80cc\u666f\u57fa\u56e0\u96c6\u5408\u3002<\/p>\n<p style=\"margin:.5em 0 1em\">\u6bcf\u4e2a\u7fa4\u5148\u505a\u7edf\u4e00 ID \u6620\u5c04\u3002\u8fc7\u5ea6\u5bcc\u96c6\u53ef\u5c06\u57fa\u56e0\u5217\u8868\u4ea4\u7ed9 <code>compareCluster()<\/code> \u5e76\u6307\u5b9a <code>enrichGO<\/code> \u53ca\u80cc\u666f\uff0c\u9010\u7fa4\u6392\u5e8f\u5bcc\u96c6\u53ef\u7528 <code>gseGO()<\/code>\u3002 <a href=\"https:\/\/bioconductor.org\/packages\/release\/bioc\/manuals\/clusterProfiler\/man\/clusterProfiler.pdf\" style=\"color:#185CB7;text-decoration:underline;\">clusterProfiler \u5b98\u65b9\u51fd\u6570\u624b\u518c<\/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;\">eg &lt;- clusterProfiler::enrichGO(gene=intersect(ids,bg),universe=bg,OrgDb=db,keyType=\"ENTREZID\",ont=\"BP\")\nhead(as.data.frame(eg)[,c(\"Description\",\"GeneRatio\",\"BgRatio\",\"p.adjust\")])\n<\/code><\/pre>\n<h2 style=\"margin:2em 0 .6em;color:#205CAC;font-size:1.38em;line-height:1.5;\">\u540c\u6837\u62bd\u4e8c\u5341\u4e2a\u57fa\u56e0\uff0c\u968f\u673a\u547d\u4e2d\u671f\u671b<\/h2>\n<p style=\"margin:.5em 0 1em\">\u4e24\u5957\u53ef\u9009\u80cc\u666f\u4e2d\u8be5 GO \u6761\u76ee\u5747\u6709\u4e94\u5341\u4e2a\u6210\u5458\uff0c\u62bd\u4e8c\u5341\u4e2a\u57fa\u56e0\u65f6\u968f\u673a\u4ea4\u96c6\u671f\u671b\u5206\u522b\u4e00\u4e0e\u4e94\u3002\u540c\u6837\u89c2\u5bdf\u4e94\u4e2a\u610f\u4e49\u4e0d\u540c\u3002\u540e\u53f0\u4f1a\u8fdb\u4e00\u6b65\u6309\u6ce8\u91ca\u4ea4\u96c6\u7b5b\u9009\uff0c\u62a5\u544a\u5b9e\u9645 BgRatio\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*50\/1000,20*50\/200,5)\nnames(v) &lt;- c(\"\u80cc\u666f\u4e00\u5343\", \"\u80cc\u666f\u4e8c\u767e\", \"\u89c2\u5bdf\u547d\u4e2d\")\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;\">\u80cc\u666f\u4e00\u5343<\/td>\n<td style=\"border-bottom:1px solid #CBDEEB;text-align:left;padding:8px;background:#FFF;\">1<\/td>\n<\/tr>\n<tr>\n<td style=\"border-bottom:1px solid #CBDEEB;text-align:left;padding:8px;background:#FFF;\">\u80cc\u666f\u4e8c\u767e<\/td>\n<td style=\"border-bottom:1px solid #CBDEEB;text-align:left;padding:8px;background:#FFF;\">5<\/td>\n<\/tr>\n<tr>\n<td style=\"border-bottom:1px solid #CBDEEB;text-align:left;padding:8px;background:#FFF;\">\u89c2\u5bdf\u547d\u4e2d<\/td>\n<td style=\"border-bottom:1px solid #CBDEEB;text-align:left;padding:8px;background:#FFF;\">5<\/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-clusterprofiler-practice-c530b464.png?resize=1120%2C690&#038;ssl=1\" alt=\"\u540c\u6837\u62bd\u4e8c\u5341\u4e2a\u57fa\u56e0\uff0c\u968f\u673a\u547d\u4e2d\u671f\u671b\u3002\u80cc\u666f\u4e00\u5343 1\uff0c\u80cc\u666f\u4e8c\u767e 5\uff0c\u89c2\u5bdf\u547d\u4e2d 5\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;\">\u80cc\u666f\u4e0d\u540c\u65f6\u540c\u6837\u4e94\u6b21\u547d\u4e2d\u7684\u5c3e\u6982\u7387<\/h2>\n<p style=\"margin:.5em 0 1em\">\u5728\u6559\u5b66\u5047\u8bbe\u7684\u4e24\u79cd\u80cc\u666f\u4e0b\uff0c\u53d6\u5f97\u81f3\u5c11\u4e94\u4e2a\u76ee\u6807\u57fa\u56e0\u7684\u5c3e\u6982\u7387\u53ef\u4ee5\u76f4\u63a5\u590d\u7b97\u3002\u8fd9\u91cc\u6ca1\u6709\u591a\u91cd\u6821\u6b63\uff0c\u771f\u5b9e GO \u7ed3\u679c\u5305\u542b\u591a\u4e2a\u6761\u76ee\uff0c\u5e76\u4e14\u6ce8\u91ca\u53ef\u7528\u6027\u4f1a\u6539\u53d8\u8d85\u51e0\u4f55\u5206\u6bcd\u3002\u4e0d\u8981\u628a\u6f14\u7b97\u6982\u7387\u76f4\u63a5\u6284\u5165\u9879\u76ee\u7ed3\u679c\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;\">sapply(c(1000,200),function(N)phyper(5-1,50,N-50,20,lower.tail=FALSE))\n<\/code><\/pre>\n<p style=\"margin:.5em 0 1em\">\u5728\u5904\u7406\u591a\u4e2a\u7ec6\u80de\u7fa4\u7684\u5bcc\u96c6\u6bd4\u8f83\u65f6\uff0c\u82e5\u672a\u6b63\u786e\u8bbe\u7f6e\u80cc\u666f\uff0c\u53ef\u80fd\u5bfc\u81f4\u5206\u6790\u7ed3\u679c\u5931\u771f\u3002\u4f8b\u5982\uff0c\u4e00\u4e2a\u7fa4\u7684\u80cc\u666f\u57fa\u56e0\u6570\u91cf\u4e3a1000\uff0c\u53e6\u4e00\u4e2a\u4e3a200\uff0c\u82e5\u4f7f\u7528\u76f8\u540c\u7684\u80cc\u666f\u8fdb\u884c\u5bcc\u96c6\u5206\u6790\uff0c\u5c06\u5bfc\u81f4\u524d\u8005\u5728\u5bcc\u96c6\u5206\u6790\u4e2d\u66f4\u5bb9\u6613\u8fbe\u5230\u663e\u8457\u6027\u6c34\u5e73\u3002\u8fd9\u79cd\u504f\u5dee\u4f1a\u63a9\u76d6\u771f\u5b9e\u751f\u7269\u5b66\u4fe1\u53f7\uff0c\u4f7f\u5f97\u7ed3\u679c\u96be\u4ee5\u89e3\u91ca\u3002\u56e0\u6b64\uff0c\u5728\u8fdb\u884c\u6bd4\u8f83\u5206\u6790\u524d\uff0c\u5e94\u786e\u4fdd\u6bcf\u4e2a\u7ec6\u80de\u7fa4\u7684\u80cc\u666f\u57fa\u56e0\u96c6\u5408\u4e0e\u5176\u5b9e\u9645\u53ef\u53c2\u4e0e\u5206\u6790\u7684\u57fa\u56e0\u8303\u56f4\u4e00\u81f4\u3002<\/p>\n<p style=\"margin:.5em 0 1em\">\u5728\u5206\u6790\u8fc7\u7a0b\u4e2d\uff0c\u9700\u8981\u7279\u522b\u5173\u6ce8\u5206\u6790\u5bf9\u8c61\u7684\u8f93\u51fa\u7ed3\u6784\uff0c\u4ee5\u4fbf\u6b63\u786e\u89e3\u8bfb\u7ed3\u679c\u3002\u4f8b\u5982\uff0c<code>enrichGO<\/code>\u51fd\u6570\u8f93\u51fa\u7684<code>Description<\/code>\u5b57\u6bb5\u8868\u793aGO\u672c\u4f53\u7684\u63cf\u8ff0\uff0c<code>GeneRatio<\/code>\u8868\u793a\u8be5\u672c\u4f53\u4e2d\u76ee\u6807\u57fa\u56e0\u7684\u6bd4\u4f8b\uff0c<code>BgRatio<\/code>\u8868\u793a\u80cc\u666f\u57fa\u56e0\u4e2d\u8be5\u672c\u4f53\u7684\u6bd4\u4f8b\u3002\u8fd9\u4e9b\u5b57\u6bb5\u7684\u7ec4\u5408\u53ef\u4ee5\u53cd\u6620\u5bcc\u96c6\u7a0b\u5ea6\u7684\u5927\u5c0f\u3002\u82e5<code>GeneRatio<\/code>\u8fdc\u5927\u4e8e<code>BgRatio<\/code>\uff0c\u5219\u8bf4\u660e\u8be5\u672c\u4f53\u5728\u76ee\u6807\u57fa\u56e0\u4e2d\u5bcc\u96c6\u3002\u82e5<code>p.adjust<\/code>\u503c\u5c0f\u4e8e\u8bbe\u5b9a\u9608\u503c\uff0c\u5219\u8ba4\u4e3a\u8be5\u5bcc\u96c6\u7ed3\u679c\u5177\u6709\u7edf\u8ba1\u663e\u8457\u6027\u3002<\/p>\n<h2 style=\"margin:2em 0 .6em;color:#205CAC;font-size:1.38em;line-height:1.5;\">\u7528\u81ea\u5b9a\u4e49\u6ce8\u91ca\u5b9e\u9645\u505a\u4e24\u6b21\u8fc7\u5ea6\u5bcc\u96c6<\/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;\">tm&lt;-rbind(data.frame(term=\"candidate\",gene=paste0(\"g\",1:15)),data.frame(term=\"all\",gene=paste0(\"g\",1:100)))\ncand&lt;-paste0(\"g\",1:7)\nf&lt;-function(bg){z&lt;-clusterProfiler::enricher(cand,universe=bg,TERM2GENE=tm,minGSSize=2,maxGSSize=200,pvalueCutoff=1,qvalueCutoff=1)\nnrow(as.data.frame(z))}\nc(f(paste0(\"g\",1:100)),f(paste0(\"g\",1:40)),length(cand))\n<\/code><\/pre>\n<p style=\"margin:.5em 0 1em\">\u5728 R 4.5.2\u3001clusterProfiler 4.18.4 \u4e2d\u8fd0\u884c\uff0c\u8f93\u51fa\u4f9d\u6b21\u4e3a\u80cc\u666f\u4e00\u5165\u9009 2\uff0c\u80cc\u666f\u4e8c\u5165\u9009 2\uff0c\u5b9e\u9645\u5019\u9009\u6570 7\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\">\u5206\u522b\u62a5\u544a\u6620\u5c04\u6210\u529f\u6570\u3001\u53ef\u68c0\u6d4b\u80cc\u666f\u548c\u57fa\u56e0\u96c6\u7248\u672c\u3002\u4e0d\u540c\u7fa4\u7684\u53ef\u68c0\u6d4b\u57fa\u56e0\u5dee\u5f02\u5927\u65f6\uff0c\u4e3a\u5404\u7fa4\u5355\u72ec\u8bbe\u7f6e\u5408\u9002\u80cc\u666f\u518d\u6bd4\u8f83\u3002<\/p>\n<p style=\"margin:.5em 0 1em\">\u5f53\u5206\u6790\u7ed3\u679c\u51fa\u73b0\u5f02\u5e38\u65f6\uff0c\u5e94\u6309\u7167\u7279\u5b9a\u987a\u5e8f\u6392\u67e5\u53ef\u80fd\u7684\u9519\u8bef\u6765\u6e90\u3002\u9996\u5148\u68c0\u67e5\u57fa\u56e0\u5217\u8868\u662f\u5426\u6b63\u786e\u6620\u5c04\uff0c\u786e\u4fdd\u6240\u6709\u57fa\u56e0\u90fd\u4e3aENTREZID\u4e14\u5df2\u6b63\u786e\u6ce8\u91ca\u3002\u5176\u6b21\u68c0\u67e5\u80cc\u666f\u96c6\u5408\u662f\u5426\u4e0e\u5b9e\u9645\u53c2\u4e0e\u5206\u6790\u7684\u57fa\u56e0\u4e00\u81f4\uff0c\u907f\u514d\u4f7f\u7528\u4e0d\u5408\u9002\u7684\u80cc\u666f\u3002\u6700\u540e\u68c0\u67e5\u5206\u6790\u53c2\u6570\u8bbe\u7f6e\u662f\u5426\u5408\u7406\uff0c\u5982<code>keyType<\/code>\u3001<code>ont<\/code>\u7b49\u53c2\u6570\u662f\u5426\u4e0e\u6570\u636e\u4e00\u81f4\u3002\u82e5\u4e0a\u8ff0\u68c0\u67e5\u5747\u65e0\u95ee\u9898\uff0c\u53ef\u8003\u8651\u662f\u5426\u5b58\u5728\u6570\u636e\u8d28\u91cf\u95ee\u9898\uff0c\u5982\u57fa\u56e0\u8868\u8fbe\u503c\u5f02\u5e38\u6216\u5206\u7ec4\u4fe1\u606f\u9519\u8bef\u3002\u901a\u8fc7\u7cfb\u7edf\u6027\u6392\u67e5\uff0c\u53ef\u4ee5\u5feb\u901f\u5b9a\u4f4d\u95ee\u9898\uff0c\u786e\u4fdd\u5206\u6790\u6d41\u7a0b\u7684\u6b63\u786e\u6027\u3002<\/p>\n<p style=\"margin:.5em 0 1em\">\u5728\u8fdb\u884c\u5bcc\u96c6\u5206\u6790\u65f6\uff0c\u82e5\u80cc\u666f\u57fa\u56e0\u96c6\u5408\u8bbe\u7f6e\u4e0d\u4e00\u81f4\uff0c\u5c06\u76f4\u63a5\u5f71\u54cd\u5bcc\u96c6\u7ed3\u679c\u7684\u663e\u8457\u6027\u3002\u82e5\u4f7f\u7528\u76f8\u540c\u80cc\u666f\u8fdb\u884c\u5206\u6790\uff0c\u524d\u8005\u53ef\u80fd\u663e\u8457\uff0c\u540e\u8005\u5219\u53ef\u80fd\u4e0d\u663e\u8457\u3002\u8fd9\u79cd\u5dee\u5f02\u4f1a\u63a9\u76d6\u771f\u5b9e\u7684\u751f\u7269\u5b66\u4fe1\u53f7\uff0c\u5bfc\u81f4\u9519\u8bef\u7ed3\u8bba\u3002\u56e0\u6b64\uff0c\u4e3a\u6bcf\u4e2a\u7ec6\u80de\u7fa4\u5355\u72ec\u8bbe\u7f6e\u5408\u9002\u7684\u80cc\u666f\u96c6\u5408\uff0c\u53ef\u4ee5\u786e\u4fdd\u5206\u6790\u7ed3\u679c\u7684\u53ef\u6bd4\u6027\u3002\u901a\u8fc7\u5bf9\u7167\u5206\u6790\uff0c\u53ef\u4ee5\u9a8c\u8bc1\u4e0d\u540c\u80cc\u666f\u8bbe\u7f6e\u5bf9\u5bcc\u96c6\u7ed3\u679c\u7684\u5f71\u54cd\uff0c\u4ece\u800c\u9009\u62e9\u6700\u5408\u9002\u7684\u5206\u6790\u7b56\u7565\u3002<\/p>\n<p style=\"margin:.5em 0 1em\">\u5728\u8fdb\u884c\u5bcc\u96c6\u5206\u6790\u65f6\uff0c\u82e5\u89c2\u5bdf\u5230\u67d0\u4e9b\u672c\u4f53\u7684\u5bcc\u96c6\u7ed3\u679c\u663e\u8457\uff0c\u5e94\u8fdb\u4e00\u6b65\u68c0\u67e5\u5176\u5b9e\u9645\u4ea4\u96c6\u7684\u5927\u5c0f\u3002\u4f8b\u5982\uff0c\u82e5\u67d0\u4e2a\u672c\u4f53\u7684<code>GeneRatio<\/code>\u4e3a50\/1000\uff0c<code>BgRatio<\/code>\u4e3a50\/200\uff0c\u5373\u4f7f\u4e24\u8005\u4ea4\u96c6\u76f8\u540c\uff0c\u4f46\u80cc\u666f\u4e0d\u540c\uff0c\u5176\u5bcc\u96c6\u7ed3\u679c\u4e5f\u4f1a\u4e0d\u540c\u3002\u82e5<code>p.adjust<\/code>\u503c\u663e\u8457\uff0c\u5219\u8bf4\u660e\u8be5\u672c\u4f53\u5728\u76ee\u6807\u57fa\u56e0\u4e2d\u786e\u5b9e\u5bcc\u96c6\u3002\u82e5<code>p.adjust<\/code>\u503c\u4e0d\u663e\u8457\uff0c\u5219\u53ef\u80fd\u662f\u80cc\u666f\u5dee\u5f02\u5bfc\u81f4\u7684\u3002\u901a\u8fc7\u5bf9\u6bd4\u4e0d\u540c\u80cc\u666f\u4e0b\u7684\u7ed3\u679c\uff0c\u53ef\u4ee5\u5224\u65ad\u5bcc\u96c6\u662f\u5426\u771f\u5b9e\u5b58\u5728\uff0c\u4ece\u800c\u907f\u514d\u56e0\u80cc\u666f\u8bbe\u7f6e\u4e0d\u5f53\u5bfc\u81f4\u7684\u8bef\u5224\u3002<\/p>\n<p style=\"margin:.5em 0 1em\">\u4f8b\u5982\uff0c\u5f53\u4e24\u4e2a\u7ec6\u80de\u7fa4\u7684\u80cc\u666f\u57fa\u56e0\u6570\u91cf\u5206\u522b\u4e3a1000\u548c200\u65f6\uff0c\u5373\u4f7f\u4e24\u8005\u90fd\u5305\u542b50\u4e2a\u76ee\u6807\u57fa\u56e0\uff0c\u5176\u5bcc\u96c6\u7ed3\u679c\u7684\u663e\u8457\u6027\u4e5f\u4f1a\u4e0d\u540c\u3002<\/p>\n<h2 style=\"margin:2em 0 .6em;color:#205CAC;font-size:1.38em;line-height:1.5;\">\u5e26\u56de\u539f\u59cb\u89c2\u6d4b\u518d\u68c0\u67e5\u4e00\u6b21<\/h2>\n<p style=\"margin:.5em 0 1em\">\u628a\u4e00\u4efd\u5dee\u5f02\u57fa\u56e0\u540d\u5355\u8ffd\u6eaf\u5230\u5206\u6790\u4e2d\u771f\u6b63\u53c2\u4e0e\u68c0\u9a8c\u7684\u57fa\u56e0\u5168\u96c6\uff0c\u518d\u5206\u522b\u5b8c\u6210\u7f16\u53f7\u8f6c\u6362\u3002\u82e5\u67d0\u5bb6\u65cf\u7684\u591a\u4e2a\u8f6c\u5f55\u672c\u90fd\u6620\u5c04\u6210\u540c\u4e00\u57fa\u56e0\uff0c\u5bcc\u96c6\u8f93\u5165\u5e94\u91c7\u7528\u4e0e\u7814\u7a76\u95ee\u9898\u4e00\u81f4\u7684\u53bb\u91cd\u5355\u4f4d\u3002\u6bd4\u8f83\u4e24\u7c7b\u7ec6\u80de\u65f6\uff0c\u6bcf\u7c7b\u53ef\u68c0\u6d4b\u7684\u57fa\u56e0\u96c6\u5408\u5e38\u4e0d\u540c\uff0c\u7ed3\u679c\u8868\u8981\u7ed9\u51fa\u5404\u81ea\u7684\u80cc\u666f\u6570\u548c\u901a\u8def\u547d\u4e2d\u6570\u3002\u540c\u4e00\u901a\u8def\u4e00\u4e2a\u663e\u8457\u3001\u4e00\u4e2a\u672a\u663e\u8457\uff0c\u4e5f\u4e0d\u8db3\u4ee5\u76f4\u63a5\u65ad\u8a00\u4e24\u4e2a\u7ec6\u80de\u7fa4\u4e4b\u95f4\u7684\u5bcc\u96c6\u7a0b\u5ea6\u5b58\u5728\u7edf\u8ba1\u5dee\u5f02\u3002<\/p>\n<p style=\"margin:.5em 0 1em\">\u5148\u4ece\u6574\u4e2a\u5b9e\u9a8c\u53ef\u89c2\u6d4b\u5e76\u5b9e\u9645\u7eb3\u5165\u68c0\u9a8c\u7684\u5bf9\u8c61\u51fa\u53d1\uff0c\u6807\u51fa\u6bcf\u4e2a\u5019\u9009\u4e3a\u4ec0\u4e48\u6709\u673a\u4f1a\u8fdb\u5165\u540d\u5355\u3002\u82e5\u4e00\u90e8\u5206\u5bf9\u8c61\u56e0\u4e3a\u547d\u540d\u4f53\u7cfb\u3001\u8986\u76d6\u6216\u9884\u5148\u8fc7\u6ee4\u5b8c\u5168\u65e0\u6cd5\u5165\u9009\uff0c\u4e0d\u80fd\u628a\u5b83\u4eec\u4e00\u5f8b\u7b97\u4f5c\u53ef\u9760\u7684\u9634\u6027\u3002\u8bb0\u5f55\u4ece\u5168\u90e8\u5bf9\u8c61\u5230\u5b9e\u9645\u53ef\u7528\u96c6\u5408\u7684\u635f\u5931\u53d1\u751f\u5728\u54ea\u4e00\u6b65\u3002\u5bf9\u4e8e\u4e00\u4e2a\u770b\u8d77\u6765\u5f88\u7a81\u51fa\u7684\u7ec4\u5408\uff0c\u53ef\u4ee5\u624b\u5de5\u6838\u5bf9\u51e0\u4e2a\u8d21\u732e\u6700\u5927\u7684\u6210\u5458\u5728\u539f\u59cb\u6570\u636e\u4e2d\u7684\u8eab\u4efd\u548c\u65b9\u5411\uff0c\u540c\u65f6\u7559\u4e00\u4e2a\u8868\u4e0a\u6ca1\u6709\u51fa\u73b0\u7684\u3001\u7406\u8bba\u4e0a\u5e94\u8be5\u53ef\u6d4b\u7684\u5bf9\u7167\u6210\u5458\u3002<\/p>\n<p style=\"margin:.5em 0 1em\">\u5982\u679c\u4e24\u4e2a\u9879\u76ee\u8981\u6bd4\u8f83\u540c\u4e00\u6307\u6807\uff0c\u53ef\u4ee5\u5148\u4ec5\u5728\u53cc\u65b9\u5171\u6709\u4e14\u5b9a\u4e49\u4e00\u81f4\u7684\u90e8\u5206\u91cd\u505a\u4e00\u6b21\uff0c\u518d\u628a\u5404\u81ea\u5168\u91cf\u7ed3\u679c\u653e\u5728\u65c1\u8fb9\u3002\u5171\u6709\u90e8\u5206\u7684\u7b54\u6848\u7a33\u4e0d\u7a33\u5b9a\uff0c\u80fd\u591f\u5e2e\u52a9\u786e\u5b9a\u5dee\u5f02\u662f\u5426\u4e3b\u8981\u7531\u4e0d\u540c\u7684\u89c2\u6d4b\u7a7a\u95f4\u9a71\u52a8\u3002\u7f29\u5c0f\u5206\u6790\u8303\u56f4\u4e5f\u53ef\u80fd\u727a\u7272\u771f\u6b63\u6709\u4fe1\u606f\u7684\u5bf9\u8c61\uff0c\u6240\u4ee5\u8fd9\u4efd\u5bf9\u7167\u8981\u548c\u539f\u5206\u6790\u540c\u65f6\u4fdd\u5b58\uff0c\u5e76\u6ce8\u660e\u5b83\u56de\u7b54\u7684\u662f\u53d7\u9650\u4ea4\u96c6\u4e2d\u7684\u95ee\u9898\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\/046-clusterprofiler-code-261f865f614c5ccc.zip\">\u4e0b\u8f7d\u672c\u7bc7 R \u4ee3\u7801\uff08ZIP\uff0c5.2 KiB\uff09<\/a> \u00b7 <a style=\"color:#1458a5;text-decoration:underline;\" href=\"https:\/\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/r-practice-labs\/046-clusterprofiler-data-e77838a029b29380.zip\">\u4e0b\u8f7d\u914d\u5957\u793a\u4f8b\u6570\u636e\uff08ZIP\uff0c1.2 KiB\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;\">046-clusterprofiler<\/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\u81ea\u5b9a\u4e49\u6ce8\u91ca\u5b9e\u9645\u505a\u4e24\u6b21\u8fc7\u5ea6\u5bcc\u96c6\u201d\u3002Linux x86_64\u3001R 4.3.3\u3001clusterProfiler 4.4.4 \u7684\u8f93\u51fa\u4e3a\u80cc\u666f\u4e00\u5165\u9009 2\uff0c\u80cc\u666f\u4e8c\u5165\u9009 2\uff0c\u5b9e\u9645\u5019\u9009\u6570 7\u3002<\/p>\n<p style=\"margin:.5em 0 1em\">\u4fdd\u6301\u5019\u9009\u57fa\u56e0\u548c TERM2GENE \u4e0d\u53d8\uff0c\u5206\u522b\u5217\u51fa\u4e24\u4e2a\u80cc\u666f\u4e0e\u6ce8\u91ca\u7684\u4ea4\u96c6\u3002\u518d\u6311\u4e00\u4e2a\u6761\u76ee\u8ba1\u7b97\u901a\u8def\u57fa\u56e0\u5360\u53ef\u68c0\u6d4b\u80cc\u666f\u7684\u6bd4\u4f8b\u3002\u6761\u76ee\u8fd4\u56de\u6570\u6070\u597d\u76f8\u540c\u4e5f\u53ef\u4ee5\u4f34\u968f P \u503c\u53d8\u5316\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\">\u4e24\u4e2a\u80cc\u666f\u7684\u4f8b\u5b50\u90fd\u5f97\u5230\u6761\u76ee\uff0c\u8f93\u51fa\u6761\u6570\u76f8\u540c\u4e5f\u4e0d\u80fd\u8bc1\u660e\u5bcc\u96c6\u8bc1\u636e\u76f8\u540c\u3002\u56de\u770b\u540c\u4e00\u6761\u76ee\u7684\u5019\u9009\u6570\u3001\u5b9e\u9645\u80cc\u666f\u548c\u8d85\u51e0\u4f55\u5c3e\u6982\u7387\uff0c\u624d\u770b\u5f97\u5230\u5206\u6bcd\u8c03\u6574\u5e26\u6765\u7684\u5f71\u54cd\u3002\u6b63\u5f0f\u6bd4\u8f83\u4e0d\u540c\u7ec6\u80de\u7c7b\u578b\u65f6\uff0c\u8fd8\u8981\u8bb0\u5f55\u54ea\u4e9b\u8f93\u5165\u57fa\u56e0\u539f\u672c\u53ef\u68c0\u9a8c\u5374\u65e0\u6cd5\u6620\u5c04\u5230\u6ce8\u91ca\u3002<\/p>\n<p style=\"border-top:1px solid #DAE6F2;margin-top:2em;padding-top:1em;\">\u5b8c\u6210\u4e00\u4e2a\u4ee3\u8868\u6837\u672c\u7684\u590d\u6838\u540e\uff0c\u82e5\u8981\u5bf9\u66f4\u591a\u6587\u5e93\u91cd\u590d\u76f8\u540c\u7684\u5904\u7406\uff0c\u53ef\u628a\u6837\u672c\u6e05\u5355\u3001\u53c2\u6570\u548c\u8f93\u51fa\u8def\u5f84\u4e00\u8d77\u8fc1\u5230<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>\u4e0a\u6309\u6279\u6b21\u8fd0\u884c\u3002<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u4e24\u5957\u53ef\u9009\u80cc\u666f\u4e2d\u8be5 GO \u6761\u76ee\u5747\u6709\u4e94\u5341\u4e2a\u6210\u5458\uff0c\u62bd\u4e8c\u5341\u4e2a\u57fa\u56e0\u65f6\u968f\u673a\u4ea4\u96c6\u671f\u671b\u5206\u522b\u4e00\u4e0e\u4e94\uff1b\u540c\u6837\u89c2\u5bdf\u4e94\u4e2a\u610f\u4e49\u4e0d\u540c\u3002<\/p>\n","protected":false},"author":1,"featured_media":68688,"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":[47,1],"tags":[765,728,761],"class_list":["post-68689","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-r","category-part","tag-clusterprofiler","tag-r","tag-761"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2026\/11\/r-guide-clusterprofiler-practice-c530b464.png?fit=1120%2C690&ssl=1","_links":{"self":[{"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/posts\/68689","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=68689"}],"version-history":[{"count":3,"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/posts\/68689\/revisions"}],"predecessor-version":[{"id":70821,"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/posts\/68689\/revisions\/70821"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/media\/68688"}],"wp:attachment":[{"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/media?parent=68689"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/categories?post=68689"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/tags?post=68689"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}