{"id":68645,"date":"2026-12-04T09:01:21","date_gmt":"2026-12-04T01:01:21","guid":{"rendered":"https:\/\/www.biocloudservice.com\/wordpress\/?p=68645"},"modified":"2026-12-04T09:01:21","modified_gmt":"2026-12-04T01:01:21","slug":"r-guide-deseq2-practice","status":"publish","type":"post","link":"https:\/\/www.biocloudservice.com\/wordpress\/r-guide-deseq2-practice\/","title":{"rendered":"DESeq2 \u591a\u7ec4\u6bd4\u8f83\u5982\u4f55\u590d\u7528\u540c\u4e00\u6b21\u62df\u5408\uff0c\u5e76\u628a\u5bf9\u6bd4\u65b9\u5411\u5199\u5bf9\uff1f"},"content":{"rendered":"<div class=\"ysx-r-practice\" id=\"ysx-r-deseq2\" 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\">\u4e09\u7ec4 RNA-seq \u5982\u679c\u4f7f\u7528\u540c\u4e00\u6279\u6837\u672c\u4e0e\u540c\u4e00\u8bbe\u8ba1\uff0c\u51e0\u4e2a\u9884\u5148\u652f\u6301\u7684\u6bd4\u8f83\u53ef\u4ee5\u4ece\u4e00\u6b21\u62df\u5408\u4e2d\u5206\u522b\u63d0\u53d6\u3002\u6700\u503c\u5f97\u5148\u9a8c\u7b97\u7684\u662f\u65b9\u5411\u3002\u628a\u5904\u7406\u4e0e\u5bf9\u7167\u4ea4\u6362\uff0c\u82e5\u8bfb\u56de\u7684\u6548\u5e94\u6ca1\u6709\u76f8\u5e94\u7ffb\u8f6c\uff0c\u5148\u6838\u5bf9\u5206\u7ec4\u6c34\u5e73\u548c\u7cfb\u6570\u540d\u3002<\/p>\n<h2 style=\"margin:2em 0 .6em;color:#205CAC;font-size:1.38em;line-height:1.5;\">DESeq2 \u7684\u8f93\u5165\u548c\u5206\u6790\u5bf9\u8c61<\/h2>\n<p style=\"margin:.5em 0 1em\">cts \u662f\u57fa\u56e0\u00d7\u6837\u672c\u672a\u5f52\u4e00\u5316\u6574\u6570\u8ba1\u6570\u3002md \u4ee5\u6837\u672c\u540d\u4f5c\u884c\u540d\uff0c\u5305\u542b\u56e0\u5b50 batch\u3001group\uff0cgroup \u6709 control\u3001treated \u4e24\u7ea7\u4e14\u5404\u7ec4\u6709\u72ec\u7acb\u91cd\u590d\u3002<\/p>\n<p style=\"margin:.5em 0 1em\">\u8ba1\u6570\u8868\u548c\u6837\u672c\u8868\u5148\u5728\u7eb8\u9762\u4e0a\u914d\u5bf9\u3002\u4e00\u5217\u662f\u4e00\u4e2a\u751f\u7269\u6837\u672c\uff0c\u4e24\u4e2a\u6cf3\u9053\u82e5\u6765\u81ea\u540c\u4e00\u4efd\u6587\u5e93\uff0c\u4e0d\u80fd\u4ec5\u56e0\u4e3a\u6709\u4e24\u4e2a\u6587\u4ef6\u5c31\u5199\u6210\u4e24\u4e2a\u72ec\u7acb\u4e2a\u4f53\u3002\u5148\u6838\u5bf9\u539f\u59cb\u8ba1\u6570\u7684\u5217\u540d\u662f\u5426\u552f\u4e00\uff0c\u91cd\u6392\u6837\u672c\u8868\u540e\u518d\u9010\u4e2a\u6bd4\u5bf9\u8eab\u4efd\u3002\u9879\u76ee\u82e5\u5df2\u7ecf\u6709\u6807\u51c6\u5316\u8868\u8fbe\u503c\u3001\u6bcf\u767e\u4e07\u8bfb\u6570\u6216\u53d6\u8fc7\u5bf9\u6570\u7684\u7ed3\u679c\uff0c\u8981\u56de\u5230\u57fa\u56e0\u7684\u539f\u59cb\u8ba1\u6570\u3002\u5df2\u6709\u8f6c\u5f55\u672c\u5b9a\u91cf\u5de5\u5177\u7684\u8f93\u51fa\u65f6\u5e94\u4f7f\u7528\u5176\u53d7\u652f\u6301\u7684\u5bfc\u5165\u6d41\u7a0b\uff0c\u7b80\u5355\u628a\u6bcf\u767e\u4e07\u8f6c\u5f55\u672c\u503c\u56db\u820d\u4e94\u5165\u65e0\u6cd5\u91cd\u5efa\u8ba1\u6570\u6570\u636e\u3002<\/p>\n<p style=\"margin:.5em 0 1em\">\u5982\u679c\u6bcf\u4e2a\u5904\u7406\u6761\u4ef6\u90fd\u8de8\u8d8a\u591a\u4e2a\u6279\u6b21\uff0c\u53ef\u4ee5\u7528\u52a0\u6027\u8bbe\u8ba1\u5728\u6bd4\u8f83\u6761\u4ef6\u65f6\u540c\u65f6\u8003\u8651\u6279\u6b21\u3002\u5148\u5217\u6279\u6b21\u4e0e\u7ec4\u522b\u7684\u4ea4\u53c9\u8868\uff0c\u518d\u67e5\u770b\u8bbe\u8ba1\u77e9\u9635\u7684\u5217\u540d\u548c\u79e9\u3002\u82e5\u5bf9\u7167\u53ea\u5728\u7b2c\u4e00\u6279\uff0c\u5904\u7406\u53ea\u5728\u7b2c\u4e8c\u6279\uff0c\u73b0\u6709\u6837\u672c\u53ea\u544a\u8bc9\u6211\u4eec\u8fd9\u4e24\u4e2a\u7ec4\u5408\u6709\u522b\uff0c\u65e0\u6cd5\u51ed\u7edf\u8ba1\u6280\u5de7\u62c6\u51fa\u7eaf\u7cb9\u7684\u5904\u7406\u6548\u5e94\u3002\u5220\u53bb\u6279\u6b21\u80fd\u4ea7\u751f\u4e00\u4e2a\u6570\u503c\uff0c\u4f46\u5b83\u540c\u65f6\u5305\u542b\u7ec4\u522b\u548c\u6279\u6b21\u3002\u53ef\u4e89\u53d6\u6709\u4ea4\u53c9\u7ec4\u5408\u7684\u65b0\u6837\u672c\uff0c\u6216\u5728\u62a5\u544a\u4e2d\u660e\u786e\u9650\u5b9a\u53ef\u4f30\u8ba1\u7684\u95ee\u9898\u3002<\/p>\n<p style=\"margin:.5em 0 1em\">\u5728\u5df2\u7ecf\u62df\u5408\u7684\u5bf9\u8c61\u4e0a\uff0c\u4f7f\u7528\u660e\u786e\u7684\u5bf9\u6bd4\u5411\u91cf\u5199\u51fa\u56e0\u7d20\u540d\u3001\u5206\u5b50\u6c34\u5e73\u548c\u5206\u6bcd\u6c34\u5e73\u3002\u5904\u7406\u5bf9\u5bf9\u7167\u7684\u6b63\u503c\u8868\u793a\u5728\u6240\u8bbe\u6a21\u578b\u4e0b\u5904\u7406\u7ec4\u7684\u671f\u671b\u8868\u8fbe\u8f83\u9ad8\u3002\u5b83\u7684\u7b26\u53f7\u6765\u81ea\u6a21\u578b\u4f30\u8ba1\u548c\u6240\u5b9a\u4e49\u7684\u65b9\u5411\uff0c\u5c06\u5bf9\u7167\u5217\u4e3a\u53c2\u8003\u6c34\u5e73\u4e0d\u4f1a\u81ea\u884c\u5236\u9020\u5411\u4e0b\u8c03\u63a7\u3002\u5b58\u5728\u4ea4\u4e92\u9879\u65f6\uff0c\u67d0\u4e3b\u6548\u5e94\u7684\u542b\u4e49\u53d6\u51b3\u4e8e\u5176\u4ed6\u56e0\u5b50\u7684\u53c2\u8003\u6c34\u5e73\uff0c\u5e94\u7528\u7cfb\u6570\u540d\u6216\u7ebf\u6027\u7ec4\u5408\u8868\u8fbe\u9884\u5148\u63d0\u51fa\u7684\u95ee\u9898\uff0c\u518d\u540c\u8bbe\u8ba1\u77e9\u9635\u9010\u9879\u6838\u5bf9\u3002<\/p>\n<p style=\"margin:.5em 0 1em\">\u5c06\u539f\u59cb\u6574\u6570\u8ba1\u6570\u3001\u6837\u672c\u8868\u548c\u53ef\u8fa8\u8bc6\u7684\u8bbe\u8ba1\u4ea4\u7ed9 <code>DESeqDataSetFromMatrix()<\/code>\uff0c\u7528 <code>DESeq()<\/code> \u62df\u5408\uff0c\u518d\u7528 <code>results()<\/code> \u63d0\u53d6\u8bbe\u8ba1\u5df2\u652f\u6301\u7684\u5bf9\u6bd4\u3002 <a href=\"https:\/\/bioconductor.org\/packages\/release\/bioc\/vignettes\/DESeq2\/inst\/doc\/DESeq2.html\" style=\"color:#185CB7;text-decoration:underline;\">DESeq2 \u5b98\u65b9\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;\">stopifnot(identical(colnames(cts),rownames(md)))\ndds &lt;- DESeq2::DESeqDataSetFromMatrix(cts,md,~batch+group)\ndds &lt;- DESeq2::DESeq(dds)\nr &lt;- DESeq2::results(dds,contrast=c(\"group\",\"treated\",\"control\"))\n<\/code><\/pre>\n<h2 style=\"margin:2em 0 .6em;color:#205CAC;font-size:1.38em;line-height:1.5;\">\u53cd\u8f6c\u5bf9\u6bd4\u65f6\u6548\u5e94\u65b9\u5411\u600e\u6837\u6539\u53d8<\/h2>\n<p style=\"margin:.5em 0 1em\">\u793a\u4f8b\u5728\u540c\u4e00\u53ef\u6bd4\u5c3a\u5ea6\u7ec4\u5747\u503c\u516b\u5341\u548c\u56db\u5341\uff0c\u5904\u7406\u5bf9\u5bf9\u7167\u7684 log2 \u6bd4\u4e3a\u4e00\uff0c\u53cd\u5411\u4e3a\u8d1f\u4e00\u3002\u624b\u7b97\u7ec4\u5747\u503c\u4e0d\u80fd\u4ee3\u66ff\u8d1f\u4e8c\u9879\u62df\u5408\u3001\u6279\u6b21\u8c03\u6574\u548c\u663e\u8457\u6027\u68c0\u9a8c\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(80,40,80\/40)\nnames(v) &lt;- c(\"\u5904\u7406\u5747\u503c\", \"\u5bf9\u7167\u5747\u503c\", \"\u4e24\u8005\u6bd4\u503c\")\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;\">\u5904\u7406\u5747\u503c<\/td>\n<td style=\"border-bottom:1px solid #CBDEEB;text-align:left;padding:8px;background:#FFF;\">80<\/td>\n<\/tr>\n<tr>\n<td style=\"border-bottom:1px solid #CBDEEB;text-align:left;padding:8px;background:#FFF;\">\u5bf9\u7167\u5747\u503c<\/td>\n<td style=\"border-bottom:1px solid #CBDEEB;text-align:left;padding:8px;background:#FFF;\">40<\/td>\n<\/tr>\n<tr>\n<td style=\"border-bottom:1px solid #CBDEEB;text-align:left;padding:8px;background:#FFF;\">\u4e24\u8005\u6bd4\u503c<\/td>\n<td style=\"border-bottom:1px solid #CBDEEB;text-align:left;padding:8px;background:#FFF;\">2<\/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-deseq2-practice-12cfe3ca.png?resize=1120%2C690&#038;ssl=1\" alt=\"\u53cd\u8f6c\u5bf9\u6bd4\u65f6\u6548\u5e94\u65b9\u5411\u600e\u6837\u6539\u53d8\u3002\u5904\u7406\u5747\u503c 80\uff0c\u5bf9\u7167\u5747\u503c 40\uff0c\u4e24\u8005\u6bd4\u503c 2\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;\">\u68c0\u67e5\u6761\u4ef6\u548c\u5efa\u5e93\u6279\u6b21\u80fd\u5426\u540c\u65f6\u4f30\u8ba1<\/h2>\n<p style=\"margin:.5em 0 1em\">\u6279\u6b21\u548c\u7ec4\u522b\u5b8c\u5168\u91cd\u5408\uff0c\u4e09\u5217\u8bbe\u8ba1\u7684\u79e9\u53ea\u6709\u4e8c\u3002\u72ec\u7acb\u4f30\u8ba1\u4e24\u4e2a\u6548\u5e94\u9700\u8981\u5b9e\u9a8c\u91cc\u5b9e\u9645\u51fa\u73b0\u4ea4\u53c9\u7ec4\u5408\u3002\u5220\u6389\u4e00\u5217\u80fd\u8ba9\u4ee3\u7801\u8dd1\u5b8c\uff0c\u5374\u4f1a\u6539\u53d8\u80fd\u591f\u89e3\u91ca\u7684\u6548\u5e94\uff0c\u5e94\u5728\u62a5\u544a\u4e2d\u8bf4\u6e05\u8fd9\u4e2a\u5c40\u9650\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;\">m &lt;- data.frame(b=c(\"1\",\"1\",\"2\",\"2\"),g=c(\"A\",\"A\",\"B\",\"B\"))\nX &lt;- model.matrix(~b+g,m)\nc(rank=qr(X)$rank,columns=ncol(X))\n<\/code><\/pre>\n<p style=\"margin:.5em 0 1em\">\u8fd9\u4efd\u6a21\u62df\u7528\u4e24\u7ec4\u4e0e\u516b\u4e2a\u72ec\u7acb\u6837\u672c\u6765\u6838\u5bf9\u65b9\u5411\uff0c\u6b63\u5f0f\u5de5\u4f5c\u6d41\u5219\u5c55\u793a\u5982\u4f55\u52a0\u5165\u6279\u6b21\u3002\u6a21\u62df\u5e76\u6ca1\u6709\u4eba\u4e3a\u690d\u5165\u4e00\u6279\u5fc5\u987b\u663e\u8457\u7684\u57fa\u56e0\u3002\u5b83\u9002\u5408\u9a8c\u8bc1\u628a\u540c\u4e00\u4e2a\u5bf9\u6bd4\u53cd\u5411\u540e\u6548\u5e94\u5e94\u6709\u7684\u5bf9\u79f0\u6027\uff0c\u4e0d\u9002\u5408\u8861\u91cf\u68c0\u51fa\u7387\u3002\u770b\u5230\u4e24\u767e\u4e2a\u57fa\u56e0\u90fd\u6709\u6709\u9650\u7684\u539f\u59cb\u68c0\u9a8c\u503c\uff0c\u4e5f\u53ea\u4ee3\u8868\u8fd9\u4e9b\u884c\u53ef\u7528\u4e8e\u672c\u6b21\u6bd4\u8f83\u3002\u5982\u679c\u8981\u9a8c\u8bc1\u68c0\u9a8c\u529f\u6548\uff0c\u9700\u8981\u53e6\u884c\u5199\u6e05\u771f\u503c\u3001\u6548\u5e94\u5927\u5c0f\u3001\u79bb\u6563\u7a0b\u5ea6\u548c\u91cd\u590d\u6570\u3002<\/p>\n<p style=\"margin:.5em 0 1em\">\u8868\u683c\u91cc\u7684\u516b\u5341\u4e0e\u56db\u5341\u662f\u5df2\u5728\u540c\u4e00\u5c3a\u5ea6\u4e0a\u7684\u4e24\u7ec4\u6559\u5b66\u5747\u503c\u3002\u5b83\u4eec\u7684\u6bd4\u503c\u4e3a\u4e8c\uff0c\u53d6\u4e8c\u4e3a\u5e95\u7684\u5bf9\u6570\u7b49\u4e8e\u4e00\u3002\u771f\u5b9e\u5206\u6790\u5148\u4f30\u8ba1\u6587\u5e93\u95f4\u7684\u5927\u5c0f\u56e0\u5b50\uff0c\u518d\u56f4\u7ed5\u8bbe\u8ba1\u62df\u5408\u6bcf\u4e2a\u57fa\u56e0\uff0c\u8fd8\u8981\u7528\u79bb\u6563\u7a0b\u5ea6\u523b\u753b\u751f\u7269\u6837\u672c\u95f4\u53d8\u5f02\u3002\u540c\u6837\u662f\u4e24\u500d\u53d8\u5316\uff0c\u82e5\u6bcf\u4f4d\u4f9b\u4f53\u51e0\u4e4e\u540c\u5411\uff0c\u4e0e\u82e5\u4ec5\u7531\u4e00\u4e2a\u6837\u672c\u6781\u9ad8\u8ba1\u6570\u9020\u6210\uff0c\u5728\u4f30\u8ba1\u4e0d\u786e\u5b9a\u6027\u4e0a\u4f1a\u975e\u5e38\u4e0d\u540c\u3002\u7ec4\u5747\u503c\u56fe\u65c1\u8fb9\u4fdd\u7559\u6bcf\u4e2a\u6837\u672c\u7684\u70b9\uff0c\u80fd\u7acb\u5373\u770b\u51fa\u8fd9\u4e24\u79cd\u60c5\u5f62\u3002<\/p>\n<p style=\"margin:.5em 0 1em\">\u663e\u8457\u6027\u95ee\u9898\u8981\u7ed3\u5408\u6240\u7528\u68c0\u9a8c\u3002\u5728\u8fd9\u91cc\u7684\u5e38\u89c4\u53cc\u4fa7 Wald \u68c0\u9a8c\u4e2d\uff0c\u628a\u6bd4\u8f83\u7684\u4e24\u4e2a\u6c34\u5e73\u4ea4\u6362\uff0c\u6548\u5e94\u53ca\u5176\u68c0\u9a8c\u7edf\u8ba1\u91cf\u7684\u7b26\u53f7\u7ffb\u8f6c\uff0c\u540c\u4e00\u6548\u5e94\u7684\u53cc\u4fa7\u539f\u59cb\u68c0\u9a8c\u503c\u4fdd\u6301\u4e00\u81f4\uff1b\u8fd9\u4e0d\u9002\u7528\u4e8e\u4efb\u610f\u5355\u4fa7\u68c0\u9a8c\u6216\u6539\u53d8\u4e86\u539f\u5047\u8bbe\u7684\u53e6\u4e00\u79cd\u6bd4\u8f83\u3002\u6c47\u603b\u65f6\u53ef\u4ee5\u628a\u6b63\u5411\u4e0e\u53cd\u5411\u8868\u6309\u57fa\u56e0\u540d\u8fde\u63a5\uff0c\u68c0\u67e5\u6548\u5e94\u4e4b\u548c\u548c\u539f\u59cb\u68c0\u9a8c\u503c\u4e4b\u5dee\u3002\u4e24\u5f20\u8868\u5206\u522b\u6309\u4e0d\u540c\u7edf\u8ba1\u91cf\u6392\u5e8f\u540e\uff0c\u7edd\u4e0d\u80fd\u53ea\u9760\u5f53\u524d\u884c\u53f7\u76f8\u51cf\u3002<\/p>\n<h2 style=\"margin:2em 0 .6em;color:#205CAC;font-size:1.38em;line-height:1.5;\">\u7528\u8d1f\u4e8c\u9879\u6a21\u62df\u6570\u636e\u5b9e\u9645\u62df\u5408\u4e00\u6b21\u518d\u53cd\u8f6c\u5bf9\u6bd4<\/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;\">set.seed(43)\nm&lt;-matrix(rnbinom(200*8,mu=40,size=4),200,8,dimnames=list(paste0(\"g\",1:200),paste0(\"s\",1:8)))\nmd&lt;-data.frame(condition=factor(rep(c(\"A\",\"B\"),each=4)),row.names=colnames(m))\nd&lt;-DESeq2::DESeqDataSetFromMatrix(m,md,~condition)\nd&lt;-DESeq2::DESeq(d,quiet=TRUE)\na&lt;-DESeq2::results(d,contrast=c(\"condition\",\"B\",\"A\"))\nb&lt;-DESeq2::results(d,contrast=c(\"condition\",\"A\",\"B\"))\nc(nrow(a),max(abs(a$log2FoldChange+b$log2FoldChange),na.rm=TRUE),sum(is.finite(a$pvalue)&amp;is.finite(b$pvalue)))\n<\/code><\/pre>\n<p style=\"margin:.5em 0 1em\">\u5728 R 4.5.2\u3001DESeq2 1.50.2 \u4e2d\u8fd0\u884c\uff0c\u8f93\u51fa\u4f9d\u6b21\u4e3a\u53ef\u6bd4\u8f83\u57fa\u56e0 200\uff0c\u4e24\u65b9\u5411\u6548\u5e94\u548c\u6700\u5927\u7edd\u5bf9\u503c 0\uff0c\u4e24\u65b9\u5411\u6709\u6548 P \u6570 200\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\">\u6837\u672c\u8868\u987a\u5e8f\u5fc5\u987b\u5339\u914d\u8ba1\u6570\u5217\u3002\u82e5\u62a5\u8bbe\u8ba1\u77e9\u9635\u4e0d\u6ee1\u79e9\uff0c\u68c0\u67e5\u6279\u6b21\u4e0e\u7ec4\u522b\u662f\u5426\u5b8c\u5168\u91cd\u5408\uff0c\u4ee5\u53ca\u7a7a\u56e0\u5b50\u6c34\u5e73\u3002<\/p>\n<p style=\"margin:.5em 0 1em\">\u8bbe\u8ba1\u56fa\u5b9a\u65f6\uff0c\u53ef\u4ee5\u4ece\u540c\u4e00\u4e2a\u62df\u5408\u5bf9\u8c61\u63d0\u53d6\u591a\u4e2a\u53d7\u8bbe\u8ba1\u652f\u6301\u7684\u6bd4\u8f83\uff0c\u4f46\u6bcf\u5f20\u8868\u4ecd\u9700\u660e\u786e\u5206\u6bcd\u548c\u7edf\u8ba1\u95ee\u9898\u3002\u5047\u8bbe\u6709\u4e09\u7ec4\u5904\u7406\uff0c\u4e00\u5bf9\u4e00\u7684\u4e09\u6b21\u6bd4\u8f83\u4e0e\u5148\u95ee\u201c\u662f\u5426\u6709\u4efb\u4e00\u7ec4\u4e0d\u540c\u201d\u7684\u603b\u4f53\u68c0\u9a8c\u4e0d\u540c\u3002\u524d\u8005\u7ed9\u6307\u5b9a\u65b9\u5411\u7684\u6548\u5e94\uff0c\u540e\u8005\u53ef\u7528\u5d4c\u5957\u6a21\u578b\u7684\u4f3c\u7136\u6bd4\u68c0\u9a8c\u56de\u7b54\u603b\u4f53\u95ee\u9898\u3002\u82e5\u5bf9\u591a\u4e2a\u5bf9\u6bd4\u5408\u5e76\u58f0\u79f0\u6574\u4f53\u9519\u8bef\u7387\u53d7\u63a7\uff0c\u8fd8\u8981\u660e\u786e\u6821\u6b63\u8986\u76d6\u4e86\u54ea\u4e9b\u5047\u8bbe\uff0c\u4e0d\u80fd\u628a\u5404\u8868\u5185\u90e8\u7684\u6821\u6b63\u81ea\u52a8\u63a8\u5e7f\u5230\u6574\u4e2a\u7b5b\u9009\u8fc7\u7a0b\u3002<\/p>\n<p style=\"margin:.5em 0 1em\">\u5bfc\u51fa\u7ed3\u679c\u65f6\u4fdd\u7559\u57fa\u56e0\u7f16\u53f7\u3001\u5e73\u5747\u5f52\u4e00\u5316\u8ba1\u6570\u3001\u6548\u5e94\u3001\u6807\u51c6\u8bef\u3001\u68c0\u9a8c\u7edf\u8ba1\u91cf\u3001\u539f\u59cb\u4e0e\u6821\u6b63\u68c0\u9a8c\u503c\u3002\u9ed8\u8ba4 Wald \u7edf\u8ba1\u91cf\u4e0d\u80fd\u4e00\u5f8b\u53eb\u4f5c\u666e\u901a\u53cc\u6837\u672c\u68c0\u9a8c\u7684 t \u503c\u3002\u67d0\u4e9b\u884c\u53ea\u6709\u6821\u6b63\u503c\u7f3a\u5931\uff0c\u53e6\u4e00\u4e9b\u53ef\u80fd\u539f\u59cb\u68c0\u9a8c\u503c\u4e5f\u7f3a\u5931\uff0c\u6240\u5bf9\u5e94\u7684\u8fc7\u6ee4\u6216\u4fe1\u606f\u4e0d\u8db3\u673a\u5236\u4e0d\u540c\u3002\u5148\u8ffd\u5230\u540c\u4e00\u57fa\u56e0\u5728\u6240\u6709\u751f\u7269\u6837\u672c\u4e2d\u7684\u539f\u59cb\u8ba1\u6570\uff0c\u67e5\u770b\u662f\u5426\u5168\u96f6\u3001\u662f\u5426\u53d7\u5f02\u5e38\u89c2\u6d4b\u5f71\u54cd\uff0c\u624d\u51b3\u5b9a\u5982\u4f55\u5728\u7ed3\u679c\u8868\u548c\u56fe\u4e2d\u5448\u73b0\u3002<\/p>\n<p style=\"margin:.5em 0 1em\">\u5f53\u51c6\u5907\u5c55\u793a\u706b\u5c71\u56fe\u65f6\uff0c\u53ef\u5148\u6311\u4e00\u4f8b\u4f4e\u8ba1\u6570\u4f46\u6548\u5e94\u4f30\u8ba1\u5f88\u5927\u7684\u57fa\u56e0\uff0c\u518d\u9009\u4e00\u4f8b\u53d8\u5316\u5e45\u5ea6\u6e29\u548c\u5374\u5728\u5404\u7ec4\u91cd\u590d\u4e2d\u4e00\u81f4\u7684\u57fa\u56e0\u3002\u4e24\u8005\u7684\u6392\u5e8f\u53d6\u51b3\u4e8e\u6253\u7b97\u56de\u7b54\u751f\u7269\u91cf\u7ea7\u3001\u8bc1\u636e\u5f3a\u5f31\u8fd8\u662f\u9884\u6d4b\u7a33\u5b9a\u6027\u3002\u82e5\u7528\u7279\u5b9a\u65b9\u6cd5\u505a\u6548\u5e94\u6536\u7f29\uff0c\u5e94\u5728\u5c55\u793a\u524d\u6838\u5bf9\u6240\u7528\u7cfb\u6570\u4e0e\u6bd4\u8f83\u65b9\u5411\uff0c\u5e76\u4fdd\u5b58\u672a\u7ecf\u6536\u7f29\u7684\u68c0\u9a8c\u5b57\u6bb5\u3002\u6536\u7f29\u53ef\u6539\u5584\u4f4e\u4fe1\u606f\u57fa\u56e0\u7684\u6548\u5e94\u4f30\u8ba1\uff0c\u4e0d\u80fd\u628a\u4e00\u6b21\u7f3a\u4e4f\u91cd\u590d\u7684\u5bf9\u7167\u53d8\u6210\u6709\u5145\u5206\u751f\u7269\u5b66\u8bc1\u636e\u7684\u8bbe\u8ba1\u3002<\/p>\n<h2 style=\"margin:2em 0 .6em;color:#205CAC;font-size:1.38em;line-height:1.5;\">\u6362\u5230\u771f\u5b9e\u6837\u672c\u65f6\u600e\u4e48\u9a8c\u8bc1<\/h2>\n<p style=\"margin:.5em 0 1em\">\u4ea4\u4ed8\u4e09\u4e2a\u6761\u4ef6\u7684\u7ed3\u679c\u65f6\uff0c\u53ef\u4e3a\u6bcf\u5f20\u8868\u5199\u4e00\u53e5\u201c\u6b63\u503c\u8868\u793a\u8c01\u76f8\u5bf9\u8c01\u5347\u9ad8\u201d\u3002\u518d\u9009\u4e00\u4e2a\u8ba1\u6570\u8db3\u591f\u3001\u5404\u6837\u672c\u65b9\u5411\u6e05\u695a\u7684\u57fa\u56e0\uff0c\u628a\u6807\u51c6\u5316\u8ba1\u6570\u6309\u6279\u6b21\u548c\u6761\u4ef6\u5217\u5728\u8868\u65c1\u3002\u82e5\u7ed3\u679c\u4e0e\u76f4\u89c2\u65b9\u5411\u76f8\u53cd\uff0c\u5148\u6838\u5bf9\u65b9\u5411\uff0c\u5176\u6b21\u6838\u5bf9\u6279\u6b21\u8c03\u6574\u662f\u5426\u6539\u53d8\u4e86\u7ec4\u95f4\u6bd4\u8f83\u3002\u5728\u6709\u4ea4\u4e92\u9879\u7684\u8bbe\u8ba1\u4e2d\uff0c\u5355\u4e2a\u4e3b\u6548\u5e94\u8fd8\u4f9d\u8d56\u53e6\u4e00\u4e2a\u56e0\u5b50\u7684\u53c2\u8003\u6c34\u5e73\uff0c\u4e0d\u80fd\u7528\u4e00\u4e2a\u7cfb\u6570\u89e3\u91ca\u6240\u6709\u65f6\u95f4\u70b9\u7684\u5904\u7406\u6548\u5e94\u3002<\/p>\n<p style=\"margin:.5em 0 1em\">\u53d6\u7ed3\u679c\u4e2d\u6700\u51c6\u5907\u89e3\u91ca\u7684\u4e00\u884c\uff0c\u628a\u6bcf\u4e2a\u72ec\u7acb\u6837\u672c\u7684\u539f\u59cb\u89c2\u6d4b\u3001\u6240\u5728\u6761\u4ef6\u4ee5\u53ca\u80fd\u591f\u652f\u6301\u8be5\u503c\u7684\u6d4b\u91cf\u6570\u6392\u5f00\u3002\u5148\u770b\u4e00\u4e2a\u6761\u4ef6\u5185\u90e8\u7684\u53d8\u5316\u8303\u56f4\uff0c\u518d\u770b\u4e24\u4e2a\u6761\u4ef6\u7684\u4e2d\u95f4\u4f4d\u7f6e\u3002\u82e5\u5dee\u5f02\u4e3b\u8981\u7531\u4e00\u4e2a\u6837\u672c\u8d21\u732e\uff0c\u67e5\u8be5\u6837\u672c\u540c\u6279\u5176\u4ed6\u6307\u6807\u662f\u5426\u4e5f\u504f\u79fb\uff0c\u7136\u540e\u4fdd\u7559\u5168\u6837\u672c\u548c\u6709\u4f9d\u636e\u7684\u654f\u611f\u6027\u5206\u6790\u4e24\u5957\u7ed3\u679c\u3002\u4ec5\u56e0\u67d0\u4e2a\u70b9\u4e0d\u7b26\u5408\u9884\u671f\u800c\u5220\u9664\uff0c\u4f1a\u540c\u65f6\u6539\u53d8\u6548\u5e94\u4f30\u8ba1\u548c\u4e0d\u786e\u5b9a\u6027\u3002<\/p>\n<p style=\"margin:.5em 0 1em\">\u4ea4\u4ed8\u8868\u91cc\u6700\u597d\u4fdd\u7559\u4f30\u8ba1\u91cf\u7684\u65b9\u5411\u4ee5\u53ca\u54ea\u4e2a\u6761\u4ef6\u4f5c\u4e3a\u53c2\u7167\u3002\u7f3a\u6d4b\u548c\u6d4b\u51fa\u4e3a\u96f6\u8981\u5206\u522b\u7f16\u7801\uff0c\u67d0\u4f4d\u53d7\u8bd5\u8005\u6ca1\u6709\u8db3\u591f\u89c2\u6d4b\u65f6\uff0c\u5e94\u80fd\u4ece\u8868\u4e0a\u770b\u51fa\u4e3a\u4ec0\u4e48\u8fd9\u4e00\u6b21\u6ca1\u6709\u6570\u503c\u3002\u5bf9\u4e8e\u540c\u4e00\u4eba\u591a\u6b21\u6d4b\u91cf\u7684\u7814\u7a76\uff0c\u6309\u53d7\u8bd5\u8005\u8fde\u7ebf\u53ef\u8ba9\u65b9\u5411\u4e00\u81f4\u6027\u76f4\u63a5\u53ef\u89c1\u3002\u628a\u8fd9\u79cd\u6837\u672c\u5c42\u68c0\u67e5\u4e0e\u6a21\u578b\u7684\u591a\u91cd\u68c0\u9a8c\u7ed3\u679c\u914d\u5408\uff0c\u80fd\u533a\u5206\u201c\u91cd\u590d\u4e2d\u65b9\u5411\u4e00\u81f4\u4f46\u8bc1\u636e\u6709\u9650\u201d\u548c\u201c\u8868\u9762\u6548\u5e94\u5f88\u5927\u5374\u7531\u5355\u4e2a\u5bf9\u8c61\u63a8\u52a8\u201d\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\/032-deseq2-code-fa7e8fa739c90767.zip\">\u4e0b\u8f7d\u672c\u7bc7 R \u4ee3\u7801\uff08ZIP\uff0c5.1 KiB\uff09<\/a> \u00b7 <a style=\"color:#1458a5;text-decoration:underline;\" href=\"https:\/\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/r-practice-labs\/032-deseq2-data-7dbe7df28423d7d7.zip\">\u4e0b\u8f7d\u914d\u5957\u793a\u4f8b\u6570\u636e\uff08ZIP\uff0c7.5 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;\">032-deseq2<\/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\u8d1f\u4e8c\u9879\u6a21\u62df\u6570\u636e\u5b9e\u9645\u62df\u5408\u4e00\u6b21\u518d\u53cd\u8f6c\u5bf9\u6bd4\u201d\u3002Linux x86_64\u3001R 4.3.3\u3001DESeq2 1.36.0 \u7684\u8f93\u51fa\u4e3a\u53ef\u6bd4\u8f83\u57fa\u56e0 200\uff0c\u4e24\u65b9\u5411\u6548\u5e94\u548c\u6700\u5927\u7edd\u5bf9\u503c 0\uff0c\u4e24\u65b9\u5411\u6709\u6548 P \u6570 200\u3002<\/p>\n<p style=\"margin:.5em 0 1em\">\u4fdd\u7559\u4e24\u5f20\u53cd\u5411 contrast \u7684\u7ed3\u679c\u8868\uff0c\u6309\u57fa\u56e0\u540d\u8fde\u63a5\u540e\u5c06 log2FoldChange \u9010\u884c\u76f8\u52a0\u3002\u548c\u5e94\u5728\u6570\u503c\u8bef\u5dee\u5185\u63a5\u8fd1\u96f6\u3002\u82e5\u53ea\u6709\u90e8\u5206\u57fa\u56e0\u4e0d\u7b26\u5408\uff0c\u5148\u786e\u8ba4\u8fde\u63a5\u7528\u7684\u662f\u7a33\u5b9a\u57fa\u56e0 ID\uff0c\u800c\u975e\u53ef\u80fd\u91cd\u590d\u7684\u57fa\u56e0\u7b26\u53f7\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\">\u53cd\u8f6c\u540c\u4e00\u4e2a\u5df2\u62df\u5408\u6a21\u578b\u4e2d\u7684\u5bf9\u6bd4\u540e\uff0c\u4e24\u5217\u6548\u5e94\u76f8\u52a0\u7684\u6700\u5927\u7edd\u5bf9\u503c\u4e3a\u96f6\uff0c\u4e24\u79cd\u65b9\u5411\u90fd\u6709\u4e24\u767e\u4e2a\u53ef\u8bc4\u4f30\u7684 P \u503c\u3002\u8fd9\u79cd\u6210\u5bf9\u6838\u67e5\u80fd\u6293\u51fa\u624b\u5199\u5bf9\u6bd4\u65f6\u6700\u5e38\u89c1\u7684\u65b9\u5411\u9519\u8bef\u3002\u5b9e\u9645\u9879\u76ee\u82e5\u91cd\u65b0\u5b9a\u4e49\u8bbe\u8ba1\u6216\u52a0\u5165\u4ea4\u4e92\u9879\uff0c\u987b\u5148\u6838\u5bf9\u7cfb\u6570\u542b\u4e49\uff0c\u4e0d\u80fd\u76f4\u63a5\u6cbf\u7528\u65e7\u7684\u7ed3\u679c\u6807\u7b7e\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>\u793a\u4f8b\u5728\u540c\u4e00\u53ef\u6bd4\u5c3a\u5ea6\u7ec4\u5747\u503c\u516b\u5341\u548c\u56db\u5341\uff0c\u5904\u7406\u5bf9\u5bf9\u7167\u7684 log2 \u6bd4\u4e3a\u4e00\uff0c\u53cd\u5411\u4e3a\u8d1f\u4e00\u3002<\/p>\n","protected":false},"author":1,"featured_media":68644,"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,72],"tags":[121,728,750],"class_list":["post-68645","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-part","category-transcriptomics","tag-deseq2","tag-r","tag-750"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2026\/11\/r-guide-deseq2-practice-12cfe3ca.png?fit=1120%2C690&ssl=1","_links":{"self":[{"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/posts\/68645","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=68645"}],"version-history":[{"count":3,"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/posts\/68645\/revisions"}],"predecessor-version":[{"id":70802,"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/posts\/68645\/revisions\/70802"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/media\/68644"}],"wp:attachment":[{"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/media?parent=68645"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/categories?post=68645"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/tags?post=68645"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}