{"id":68658,"date":"2026-12-04T09:01:21","date_gmt":"2026-12-04T01:01:21","guid":{"rendered":"https:\/\/www.biocloudservice.com\/wordpress\/?p=68658"},"modified":"2026-12-04T09:01:21","modified_gmt":"2026-12-04T01:01:21","slug":"r-guide-drimseq-practice","status":"publish","type":"post","link":"https:\/\/www.biocloudservice.com\/wordpress\/r-guide-drimseq-practice\/","title":{"rendered":"DRIMSeq \u68c0\u9a8c\u8f6c\u5f55\u672c\u4f7f\u7528\u65f6\uff0c\u8fc7\u6ee4\u6389\u4e00\u4e2a\u5f02\u6784\u4f53\u4f1a\u600e\u6837\u6539\u53d8\u5206\u6bcd\uff1f"},"content":{"rendered":"<div class=\"ysx-r-practice\" id=\"ysx-r-drimseq\" 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\">\u5220\u9664\u4e00\u4e2a\u4f4e\u8986\u76d6\u8f6c\u5f55\u672c\u4ee5\u540e\uff0c\u7559\u4e0b\u7684\u4e3b\u8f6c\u5f55\u672c\u8ba1\u6570\u53ef\u80fd\u5b8c\u5168\u4e0d\u52a8\uff0c\u6240\u5360\u6bd4\u4f8b\u5374\u4f1a\u4e0a\u5347\u3002DRIMSeq \u7684\u8fc7\u6ee4\u65e2\u6539\u53d8\u54ea\u4e9b\u7279\u5f81\u6709\u8d44\u683c\u68c0\u9a8c\uff0c\u4e5f\u4f1a\u6539\u53d8\u57fa\u56e0\u5185\u90e8\u7684\u53ef\u7528\u7ec4\u6210\u3002\u6311\u4e00\u4e2a\u57fa\u56e0\u5728\u8fc7\u6ee4\u524d\u540e\u5404\u7b97\u4e00\u6b21\u6700\u76f4\u89c2\u3002<\/p>\n<h2 style=\"margin:2em 0 .6em;color:#205CAC;font-size:1.38em;line-height:1.5;\">DRIMSeq \u7684\u8f93\u5165\u548c\u5206\u6790\u5bf9\u8c61<\/h2>\n<p style=\"margin:.5em 0 1em\">d \u4e3a\u5df2\u7531 dmDSdata \u5efa\u597d\u5e76\u6309\u8986\u76d6\u8fc7\u6ee4\u7684\u5bf9\u8c61\u3002design \u884c\u987a\u5e8f\u4e0e\u6837\u672c\u4e00\u81f4\u4e14\u6ee1\u79e9\uff0ccoef_name \u662f\u5176\u4e2d\u7684\u76ee\u6807\u6761\u4ef6\u5217\u540d\u3002<\/p>\n<p style=\"margin:.5em 0 1em\">\u5728\u4f7f\u7528DRIMSeq\u8fdb\u884c\u8f6c\u5f55\u672c\u4f7f\u7528\u5dee\u5f02\u5206\u6790\u65f6\uff0c\u8fc7\u6ee4\u6389\u4e00\u4e2a\u5f02\u6784\u4f53\u5bf9\u7ed3\u679c\u5206\u6bcd\u7684\u5f71\u54cd\u662f\u4e00\u4e2a\u5173\u952e\u95ee\u9898\u3002\u8be5\u95ee\u9898\u7684\u6838\u5fc3\u5728\u4e8e\uff0c\u5f53\u4e00\u4e2a\u7a00\u6709\u8f6c\u5f55\u672c\u88ab\u79fb\u9664\u540e\uff0c\u5176\u4f59\u8f6c\u5f55\u672c\u7684\u76f8\u5bf9\u6bd4\u4f8b\u4f1a\u53d1\u751f\u53d8\u5316\uff0c\u4ece\u800c\u5f71\u54cd\u6700\u7ec8\u7684\u7edf\u8ba1\u63a8\u65ad\u3002\u8fd9\u79cd\u53d8\u5316\u4e0d\u4ec5\u4f53\u73b0\u5728\u6bd4\u4f8b\u4f30\u8ba1\u4e0a\uff0c\u4e5f\u4f1a\u5f71\u54cd\u6a21\u578b\u7684\u62df\u5408\u548c\u663e\u8457\u6027\u68c0\u9a8c\u7684\u7ed3\u679c\u3002\u4e3a\u4e86\u7406\u89e3\u8fd9\u4e00\u5f71\u54cd\uff0c\u9700\u8981\u4ece\u6570\u636e\u7ed3\u6784\u548c\u6a21\u578b\u8bbe\u5b9a\u5165\u624b\uff0c\u660e\u786e\u8fc7\u6ee4\u64cd\u4f5c\u524d\u540e\u7684\u8f6c\u5f55\u672c\u7ec4\u6210\u5dee\u5f02\u3002\u8fd9\u79cd\u5dee\u5f02\u5728\u57fa\u56e0\u7ea7\u5206\u6790\u4e2d\u5c24\u4e3a\u660e\u663e\uff0c\u56e0\u4e3a\u6bcf\u4e2a\u57fa\u56e0\u7684\u8f6c\u5f55\u672c\u7ec4\u6210\u51b3\u5b9a\u4e86\u5176\u8868\u8fbe\u6a21\u5f0f\u7684\u79bb\u6563\u5ea6\u548c\u7edf\u8ba1\u6548\u80fd\u3002<\/p>\n<p style=\"margin:.5em 0 1em\">\u8f93\u5165\u5bf9\u8c61d\u662f\u7ecf\u8fc7dmDSdata\u6784\u5efa\u5e76\u5b8c\u6210\u521d\u6b65\u8fc7\u6ee4\u7684\u8f6c\u5f55\u672c\u8ba1\u6570\u6570\u636e\uff0c\u5176\u5305\u542b\u6bcf\u4e2a\u6837\u672c\u4e2d\u5404\u8f6c\u5f55\u672c\u7684\u8868\u8fbe\u91cf\u3002\u8bbe\u8ba1\u77e9\u9635design\u4e0e\u6837\u672c\u987a\u5e8f\u4e00\u81f4\u4e14\u6ee1\u79e9\uff0c\u786e\u4fdd\u4e86\u6a21\u578b\u53ef\u4ee5\u51c6\u786e\u4f30\u8ba1\u5404\u6761\u4ef6\u4e0b\u7684\u8868\u8fbe\u5dee\u5f02\u3002coef_name\u662f\u8bbe\u8ba1\u77e9\u9635\u4e2d\u76ee\u6807\u6bd4\u8f83\u7684\u5217\u540d\uff0c\u7528\u4e8e\u6307\u5b9a\u6bd4\u8f83\u7684\u7ec4\u522b\u3002\u8fd9\u4e9b\u8f93\u5165\u6570\u636e\u51b3\u5b9a\u4e86\u5206\u6790\u7684\u8303\u56f4\u548c\u65b9\u5411\uff0c\u4e5f\u51b3\u5b9a\u4e86\u540e\u7eed\u6a21\u578b\u62df\u5408\u7684\u7a33\u5b9a\u6027\u548c\u53ef\u89e3\u91ca\u6027\u3002<\/p>\n<p style=\"margin:.5em 0 1em\">\u5728\u8fc7\u6ee4\u524d\u540e\u4fdd\u7559\u7684\u57fa\u56e0\u548c\u8f6c\u5f55\u672c\u6570\u91cf\u53d8\u5316\uff0c\u76f4\u63a5\u53cd\u6620\u4e86\u6570\u636e\u4e2d\u8868\u8fbe\u6a21\u5f0f\u7684\u5206\u5e03\u60c5\u51b5\u3002\u5f53\u4e00\u4e2a\u7a00\u6709\u8f6c\u5f55\u672c\u88ab\u79fb\u9664\u540e\uff0c\u4e3b\u8f6c\u5f55\u672c\u7684\u5360\u6bd4\u4f1a\u76f8\u5e94\u589e\u52a0\uff0c\u8fd9\u79cd\u53d8\u5316\u5728\u6bd4\u4f8b\u4f30\u8ba1\u4e2d\u4f53\u73b0\u4e3a\u5206\u6bcd\u7684\u8c03\u6574\u3002\u5728\u672c\u4f8b\u4e2d\uff0c\u4e3b\u8f6c\u5f55\u672c\u539f\u8ba1\u6570\u4e3a\u516d\u5341\uff0c\u5360\u6bd4\u4e3a\u767e\u5206\u4e4b\u516d\u5341\uff0c\u5220\u9664\u7a00\u6709\u8f6c\u5f55\u672c\u540e\uff0c\u5176\u5360\u6bd4\u53d8\u4e3a\u7ea6\u767e\u5206\u4e4b\u516d\u5341\u516d\u70b9\u4e03\u3002\u8fd9\u79cd\u53d8\u5316\u8bf4\u660e\uff0c\u8fc7\u6ee4\u64cd\u4f5c\u4e0d\u4ec5\u5f71\u54cd\u4e86\u7279\u5f81\u6570\u91cf\uff0c\u66f4\u6539\u53d8\u4e86\u8868\u8fbe\u6a21\u5f0f\u7684\u6784\u6210\uff0c\u4ece\u800c\u5f71\u54cd\u4e86\u6a21\u578b\u4f30\u8ba1\u7684\u7a33\u5b9a\u6027\u3002\u8fd9\u79cd\u5f71\u54cd\u5728\u7a00\u758f\u6570\u636e\u4e2d\u5c24\u4e3a\u663e\u8457\uff0c\u56e0\u4e3a\u7a00\u6709\u8f6c\u5f55\u672c\u7684\u8868\u8fbe\u91cf\u4f4e\uff0c\u5176\u5bf9\u6574\u4f53\u6bd4\u4f8b\u7684\u8d21\u732e\u5fae\u5c0f\uff0c\u4f46\u4e00\u65e6\u88ab\u79fb\u9664\uff0c\u4e3b\u8f6c\u5f55\u672c\u7684\u76f8\u5bf9\u6743\u91cd\u4f1a\u663e\u8457\u5347\u9ad8\u3002<\/p>\n<p style=\"margin:.5em 0 1em\">\u628a\u8f6c\u5f55\u672c\u8ba1\u6570\u914d\u4e0a\u6240\u5c5e\u57fa\u56e0\u548c\u6837\u672c\u8bbe\u8ba1\uff0c\u7528 <code>dmFilter()<\/code> \u7559\u4e0b\u6709\u8986\u76d6\u7684\u7279\u5f81\uff0c\u518d\u4f9d\u6b21 <code>dmPrecision()<\/code>\u3001<code>dmFit()<\/code>\u3001<code>dmTest()<\/code>\u3002 <a href=\"https:\/\/bioconductor.org\/packages\/release\/bioc\/vignettes\/DRIMSeq\/inst\/doc\/DRIMSeq.pdf\" style=\"color:#185CB7;text-decoration:underline;\">DRIMSeq \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;\">d &lt;- DRIMSeq::dmPrecision(d, design=design)\nd &lt;- DRIMSeq::dmFit(d, design=design)\nd &lt;- DRIMSeq::dmTest(d, coef=coef_name)\nhead(DRIMSeq::results(d))\n<\/code><\/pre>\n<h2 style=\"margin:2em 0 .6em;color:#205CAC;font-size:1.38em;line-height:1.5;\">\u5220\u53bb\u4e00\u4e2a\u6210\u5206\u540e\u4e3b\u8f6c\u5f55\u672c\u7684\u4efd\u989d<\/h2>\n<p style=\"margin:.5em 0 1em\">\u4e09\u79cd\u8f6c\u5f55\u672c\u539f\u8ba1\u6570\u516d\u5341\u3001\u4e09\u5341\u3001\u5341\u3002\u5220\u9664\u7b2c\u4e09\u79cd\u524d\u540e\u4e3b\u578b\u8ba1\u6570\u90fd\u662f\u516d\u5341\uff0c\u6240\u5360\u767e\u5206\u6bd4\u7531\u516d\u5341\u53d8\u6210\u7ea6\u516d\u5341\u516d\u70b9\u4e03\u3002\u7b2c\u4e09\u9879\u7ed9\u51fa\u539f\u7a00\u6709\u578b\u7684\u767e\u5206\u6bd4\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(100*60\/100,100*60\/90,100*10\/100)\nnames(v) &lt;- c(\"\u4e3b\u578b\u539f\u5360\u6bd4\", \"\u4e3b\u578b\u5220\u540e\u5360\u6bd4\", \"\u539f\u7a00\u6709\u578b\u5360\u6bd4\")\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;\">\u4e3b\u578b\u539f\u5360\u6bd4<\/td>\n<td style=\"border-bottom:1px solid #CBDEEB;text-align:left;padding:8px;background:#FFF;\">60%<\/td>\n<\/tr>\n<tr>\n<td style=\"border-bottom:1px solid #CBDEEB;text-align:left;padding:8px;background:#FFF;\">\u4e3b\u578b\u5220\u540e\u5360\u6bd4<\/td>\n<td style=\"border-bottom:1px solid #CBDEEB;text-align:left;padding:8px;background:#FFF;\">66.67%<\/td>\n<\/tr>\n<tr>\n<td style=\"border-bottom:1px solid #CBDEEB;text-align:left;padding:8px;background:#FFF;\">\u539f\u7a00\u6709\u578b\u5360\u6bd4<\/td>\n<td style=\"border-bottom:1px solid #CBDEEB;text-align:left;padding:8px;background:#FFF;\">10%<\/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-drimseq-practice-9c04cd8c.png?resize=1120%2C690&#038;ssl=1\" alt=\"\u5220\u53bb\u4e00\u4e2a\u6210\u5206\u540e\u4e3b\u8f6c\u5f55\u672c\u7684\u4efd\u989d\u3002\u4e3b\u578b\u539f\u5360\u6bd4 60%\uff0c\u4e3b\u578b\u5220\u540e\u5360\u6bd4 66.67%\uff0c\u539f\u7a00\u6709\u578b\u5360\u6bd4 10%\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;\">\u53ea\u5269\u4e00\u4e2a\u8f6c\u5f55\u672c\u65f6\u8fd8\u6709\u54ea\u4e9b\u6bd4\u4f8b\u80fd\u6bd4\u8f83\uff1f<\/h2>\n<p style=\"margin:.5em 0 1em\">\u8fc7\u6ee4\u540e\u53ea\u5269\u4e00\u4e2a\u8f6c\u5f55\u672c\uff0c\u5404\u4e2a\u6709\u8986\u76d6\u7684\u6837\u672c\u5185\u4efd\u989d\u90fd\u4e3a\u4e00\u3002\u5373\u4f7f\u8ba1\u6570\u968f\u6837\u672c\u53d8\u5316\uff0c\u4e5f\u65e0\u6cd5\u7528\u8fd9\u4efd\u77e9\u9635\u8ba8\u8bba\u540c\u4e00\u57fa\u56e0\u5185\u90e8\u5982\u4f55\u91cd\u65b0\u5206\u914d\u3002\u4fdd\u7559\u5931\u8d25\u539f\u56e0\uff0c\u4e0d\u8981\u628a\u4e0d\u53ef\u68c0\u9a8c\u7684\u57fa\u56e0\u5206\u7c7b\u4e3a\u65e0\u5dee\u5f02\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;\">x &lt;- rbind(t1=c(10,8,14),t2=c(0,0,0))\nz &lt;- x[rowSums(x)&gt;0,,drop=FALSE]\nsweep(z,2,colSums(z),\"\/\")\n<\/code><\/pre>\n<p style=\"margin:.5em 0 1em\">\u5728\u5b9e\u9645\u64cd\u4f5c\u4e2d\uff0c\u8fc7\u6ee4\u6b65\u9aa4\u7684\u8bbe\u5b9a\u5bf9\u6700\u7ec8\u7ed3\u679c\u7684\u89e3\u91ca\u5177\u6709\u51b3\u5b9a\u6027\u5f71\u54cd\u3002\u5982\u679c\u8fc7\u6ee4\u9608\u503c\u8bbe\u7f6e\u8fc7\u4e25\uff0c\u53ef\u80fd\u5bfc\u81f4\u4e3b\u8f6c\u5f55\u672c\u7684\u8868\u8fbe\u6bd4\u4f8b\u88ab\u9519\u8bef\u4f30\u8ba1\uff0c\u4ece\u800c\u5f71\u54cd\u663e\u8457\u6027\u68c0\u9a8c\u7684\u51c6\u786e\u6027\u3002\u53cd\u4e4b\uff0c\u5982\u679c\u8fc7\u6ee4\u9608\u503c\u8bbe\u7f6e\u8fc7\u677e\uff0c\u5219\u53ef\u80fd\u5f15\u5165\u8fc7\u591a\u566a\u58f0\uff0c\u5bfc\u81f4\u6a21\u578b\u4f30\u8ba1\u4e0d\u7a33\u5b9a\u3002\u56e0\u6b64\uff0c\u9700\u8981\u5728\u8fc7\u6ee4\u524d\u540e\u5bf9\u6bd4\u4fdd\u7559\u7684\u57fa\u56e0\u548c\u8f6c\u5f55\u672c\u6570\u91cf\uff0c\u786e\u4fdd\u5206\u6790\u7684\u7a33\u5065\u6027\u3002\u540c\u65f6\uff0c\u8fd8\u9700\u8981\u5173\u6ce8\u8fc7\u6ee4\u540e\u6bd4\u4f8b\u4f30\u8ba1\u7684\u53d8\u5316\uff0c\u7279\u522b\u662f\u4e3b\u8f6c\u5f55\u672c\u5360\u6bd4\u7684\u589e\u52a0\u662f\u5426\u5408\u7406\u3002<\/p>\n<p style=\"margin:.5em 0 1em\">\u5728DRIMSeq\u5206\u6790\u4e2d\uff0c\u4e00\u4e2a\u5178\u578b\u7684\u4f8b\u5b50\u662f\u5f53\u4e00\u4e2a\u57fa\u56e0\u7684\u4e24\u79cd\u4e3b\u8981\u8f6c\u5f55\u672c\u8ba1\u6570\u5206\u522b\u4e3a\u516d\u5341\u548c\u4e09\u5341\uff0c\u800c\u7b2c\u4e09\u79cd\u7a00\u6709\u8f6c\u5f55\u672c\u8ba1\u6570\u4e3a\u5341\u3002\u5220\u9664\u7b2c\u4e09\u79cd\u8f6c\u5f55\u672c\u540e\uff0c\u4e3b\u8f6c\u5f55\u672c\u7684\u5360\u6bd4\u7531\u767e\u5206\u4e4b\u516d\u5341\u4e0a\u5347\u81f3\u7ea6\u767e\u5206\u4e4b\u516d\u5341\u516d\u70b9\u4e03\u3002\u8fd9\u4e00\u53d8\u5316\u8bf4\u660e\uff0c\u7a00\u6709\u8f6c\u5f55\u672c\u7684\u5b58\u5728\u4f1a\u7a00\u91ca\u4e3b\u8f6c\u5f55\u672c\u7684\u8868\u8fbe\u6bd4\u4f8b\uff0c\u4ece\u800c\u5f71\u54cd\u6a21\u578b\u4f30\u8ba1\u7684\u51c6\u786e\u6027\u3002\u8fd9\u79cd\u6bd4\u4f8b\u53d8\u5316\u5728\u5b9e\u9645\u5206\u6790\u4e2d\u53ef\u80fd\u5bfc\u81f4\u663e\u8457\u6027\u68c0\u9a8c\u7ed3\u679c\u7684\u504f\u5dee\uff0c\u7279\u522b\u662f\u5728\u6837\u672c\u91cf\u8f83\u5c0f\u7684\u60c5\u51b5\u4e0b\u3002\u56e0\u6b64\uff0c\u9700\u8981\u5728\u5206\u6790\u524d\u660e\u786e\u8fc7\u6ee4\u7b56\u7565\uff0c\u786e\u4fdd\u4e3b\u8f6c\u5f55\u672c\u7684\u8868\u8fbe\u6bd4\u4f8b\u80fd\u591f\u771f\u5b9e\u53cd\u6620\u5176\u5728\u57fa\u56e0\u8868\u8fbe\u4e2d\u7684\u8d21\u732e\u3002<\/p>\n<p style=\"margin:.5em 0 1em\">\u5728\u672c\u4f8b\u4e2d\uff0c\u7b2c\u4e09\u79cd\u8f6c\u5f55\u672c\u7684\u8ba1\u6570\u4e3a\u5341\uff0c\u8fdc\u4f4e\u4e8e\u4e3b\u8f6c\u5f55\u672c\u7684\u8ba1\u6570\u3002\u8fd9\u79cd\u7a00\u758f\u6027\u4f7f\u5f97\u5176\u5bf9\u6574\u4f53\u6bd4\u4f8b\u7684\u5f71\u54cd\u8f83\u5c0f\uff0c\u4f46\u4e00\u65e6\u88ab\u79fb\u9664\uff0c\u4e3b\u8f6c\u5f55\u672c\u7684\u76f8\u5bf9\u6743\u91cd\u4f1a\u663e\u8457\u589e\u52a0\u3002\u8fd9\u79cd\u53d8\u5316\u5728\u6bd4\u4f8b\u4f30\u8ba1\u4e2d\u4f53\u73b0\u4e3a\u5206\u6bcd\u7684\u8c03\u6574\uff0c\u4ece\u800c\u5f71\u54cd\u6a21\u578b\u7684\u62df\u5408\u7ed3\u679c\u3002<\/p>\n<h2 style=\"margin:2em 0 .6em;color:#205CAC;font-size:1.38em;line-height:1.5;\">\u7528 dmFilter \u5b9e\u9645\u7b5b\u6389\u4f4e\u8986\u76d6\u8f6c\u5f55\u672c<\/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;\">cnt&lt;-data.frame(gene_id=rep(c(\"g1\",\"g2\"),each=3),feature_id=paste0(\"t\",1:6),s1=c(20,10,0,18,8,0),s2=c(22,12,1,17,9,0),s3=c(9,25,0,8,19,0),s4=c(10,20,0,7,20,1))\nsm&lt;-data.frame(sample_id=paste0(\"s\",1:4),group=rep(c(\"A\",\"B\"),each=2))\nd&lt;-DRIMSeq::dmDSdata(counts=cnt,samples=sm)\nf&lt;-DRIMSeq::dmFilter(d,min_samps_feature_expr=2,min_feature_expr=5,min_samps_gene_expr=2,min_gene_expr=10)\noc&lt;-as.data.frame(DRIMSeq::counts(f))\nc(nrow(cnt),nrow(oc),length(unique(oc$gene_id)))\n<\/code><\/pre>\n<p style=\"margin:.5em 0 1em\">\u5728 R 4.5.2\u3001DRIMSeq 1.38.0 \u4e2d\u8fd0\u884c\uff0c\u8f93\u51fa\u4f9d\u6b21\u4e3a\u521d\u59cb\u8f6c\u5f55\u672c 6\uff0c\u7b5b\u540e\u8f6c\u5f55\u672c 4\uff0c\u7b5b\u540e\u57fa\u56e0 2\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\">\u7a00\u758f\u8f6c\u5f55\u672c\u6216\u53ea\u5269\u4e00\u4e2a\u6709\u4fe1\u606f\u7684\u8f6c\u5f55\u672c\u4f1a\u4f7f\u6bd4\u4f8b\u96be\u4ee5\u6bd4\u8f83\u3002\u8bb0\u5f55\u8fc7\u6ee4\u524d\u540e\u4fdd\u7559\u7684\u57fa\u56e0\u53ca\u8f6c\u5f55\u672c\u6570\u3002<\/p>\n<p style=\"margin:.5em 0 1em\">\u5728DRIMSeq\u5206\u6790\u4e2d\uff0c\u5e38\u89c1\u7684\u6545\u969c\u5305\u62ec\u8fc7\u6ee4\u540e\u8f6c\u5f55\u672c\u6570\u91cf\u8fc7\u5c11\u548c\u6bd4\u4f8b\u4f30\u8ba1\u4e0d\u7a33\u5b9a\u3002\u5f53\u8fc7\u6ee4\u64cd\u4f5c\u79fb\u9664\u4e86\u8fc7\u591a\u7684\u8f6c\u5f55\u672c\u540e\uff0c\u6a21\u578b\u4f30\u8ba1\u7684\u7cbe\u786e\u5ea6\u4f1a\u4e0b\u964d\uff0c\u5bfc\u81f4\u663e\u8457\u6027\u68c0\u9a8c\u7ed3\u679c\u4e0d\u53ef\u9760\u3002\u6b64\u65f6\u5e94\u9996\u5148\u68c0\u67e5\u8fc7\u6ee4\u524d\u540e\u4fdd\u7559\u7684\u8f6c\u5f55\u672c\u6570\u91cf\uff0c\u786e\u8ba4\u662f\u5426\u56e0\u8fc7\u6ee4\u9608\u503c\u8bbe\u7f6e\u8fc7\u4e25\u5bfc\u81f4\u4fe1\u606f\u4e22\u5931\u3002\u5176\u6b21\uff0c\u5e94\u68c0\u67e5genewise_precision\u5bf9\u8c61\u4e2d\u7684\u7cbe\u786e\u5ea6\u4f30\u8ba1\uff0c\u786e\u8ba4\u662f\u5426\u5b58\u5728\u5f02\u5e38\u503c\u3002<\/p>\n<p style=\"margin:.5em 0 1em\">\u5728\u654f\u611f\u6027\u5206\u6790\u4e2d\uff0c\u901a\u8fc7\u8c03\u6574\u8fc7\u6ee4\u9608\u503c\uff0c\u53ef\u4ee5\u89c2\u5bdf\u4e0d\u540c\u7b56\u7565\u5bf9\u7ed3\u679c\u7684\u5f71\u54cd\u3002\u4f8b\u5982\uff0c\u5f53\u8fc7\u6ee4\u9608\u503c\u8bbe\u7f6e\u8f83\u4e25\u65f6\uff0c\u4e3b\u8f6c\u5f55\u672c\u7684\u8868\u8fbe\u6bd4\u4f8b\u4f1a\u56e0\u7a00\u6709\u8f6c\u5f55\u672c\u88ab\u79fb\u9664\u800c\u5347\u9ad8\uff0c\u4ece\u800c\u5f71\u54cd\u663e\u8457\u6027\u68c0\u9a8c\u7684\u7ed3\u679c\u3002\u5f53\u8fc7\u6ee4\u9608\u503c\u8bbe\u7f6e\u8f83\u677e\u65f6\uff0c\u867d\u7136\u4fdd\u7559\u4e86\u66f4\u591a\u8f6c\u5f55\u672c\uff0c\u4f46\u53ef\u80fd\u5f15\u5165\u566a\u58f0\uff0c\u5bfc\u81f4\u6bd4\u4f8b\u4f30\u8ba1\u4e0d\u7a33\u5b9a\u3002\u901a\u8fc7\u5bf9\u6bd4\u4e0d\u540c\u9608\u503c\u4e0b\u7684\u7ed3\u679c\uff0c\u53ef\u4ee5\u5224\u65ad\u8fc7\u6ee4\u64cd\u4f5c\u5bf9\u5206\u6790\u7ed3\u8bba\u7684\u5f71\u54cd\u7a0b\u5ea6\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\">\u82e5\u4e24\u4e2a\u6837\u672c\u67d0\u8f6c\u5f55\u672c\u540c\u6837\u6709\u5341\u4e2a\u8bfb\u6bb5\uff0c\u4e00\u4e2a\u6837\u672c\u7684\u540c\u57fa\u56e0\u603b\u6570\u662f\u4e00\u767e\uff0c\u53e6\u4e00\u4e2a\u662f\u4e8c\u5341\uff0c\u5b83\u4eec\u7ed9\u4f7f\u7528\u6bd4\u4f8b\u7684\u8bc1\u636e\u5b8c\u5168\u4e0d\u540c\u3002\u5148\u5199\u51fa\u6bcf\u4e2a\u57fa\u56e0\u7684\u5206\u6bcd\uff0c\u540c\u65f6\u4fdd\u7559\u8fc7\u6ee4\u524d\u540e\u7684\u8f6c\u5f55\u672c\u6e05\u5355\u3002\u79fb\u9664\u4f4e\u8986\u76d6\u8f6c\u5f55\u672c\u540e\uff0c\u91cd\u65b0\u5728\u4fdd\u7559\u96c6\u5408\u5185\u6838\u5bf9\u5206\u6bcd\u548c\u5404\u9879\u6bd4\u4f8b\u548c\uff0c\u518d\u68c0\u67e5\u8be5\u57fa\u56e0\u662f\u5426\u4ecd\u6709\u8db3\u591f\u53ef\u6bd4\u8f83\u7684\u8f6c\u5f55\u672c\u3002\u53ea\u6709\u4e00\u4e2a\u6709\u6548\u7ec4\u6210\u65f6\uff0c\u901a\u5e38\u5df2\u5931\u53bb\u6bd4\u8f83\u5185\u90e8\u4f7f\u7528\u5dee\u5f02\u7684\u7a7a\u95f4\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\/037-drimseq-code-465bb28592afd707.zip\">\u4e0b\u8f7d\u672c\u7bc7 R \u4ee3\u7801\uff08ZIP\uff0c4.5 KiB\uff09<\/a> \u00b7 <a style=\"color:#1458a5;text-decoration:underline;\" href=\"https:\/\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/r-practice-labs\/037-drimseq-data-79d2d7400581ef2f.zip\">\u4e0b\u8f7d\u914d\u5957\u793a\u4f8b\u6570\u636e\uff08ZIP\uff0c1.1 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;\">037-drimseq<\/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 dmFilter \u5b9e\u9645\u7b5b\u6389\u4f4e\u8986\u76d6\u8f6c\u5f55\u672c\u201d\u3002Linux x86_64\u3001R 4.5.2\u3001DRIMSeq 1.38.0 \u7684\u8f93\u51fa\u4e3a\u521d\u59cb\u8f6c\u5f55\u672c 6\uff0c\u7b5b\u540e\u8f6c\u5f55\u672c 4\uff0c\u7b5b\u540e\u57fa\u56e0 2\u3002<\/p>\n<p style=\"margin:.5em 0 1em\">\u5728\u4e24\u5957\u8ba1\u6570\u95e8\u69db\u4e0b\u4fdd\u5b58\u4fdd\u7559\u7684\u8f6c\u5f55\u672c ID\u3002\u6309 gene_id \u6bd4\u8f83\u6bcf\u4e2a\u57fa\u56e0\u5404\u5269\u51e0\u6761\u53ef\u6bd4\u8f83\u8f6c\u5f55\u672c\uff0c\u5c24\u5176\u7559\u610f\u53ea\u5269\u4e00\u6761\u7684\u57fa\u56e0\u3002\u7279\u5f81\u884c\u6570\u548c\u53ef\u5f00\u5c55\u7528\u91cf\u6bd4\u8f83\u7684\u57fa\u56e0\u6570\u5e94\u5206\u522b\u62a5\u544a\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\">\u6309\u4e24\u4e2a\u6837\u672c\u81f3\u5c11\u4e94\u4e2a\u8ba1\u6570\u7684\u4f8b\u793a\u89c4\u5219\uff0c\u516d\u4e2a\u8f6c\u5f55\u672c\u5269\u56db\u4e2a\uff0c\u4e24\u4e2a\u57fa\u56e0\u90fd\u8fd8\u4fdd\u7559\u3002\u62a5\u544a\u8fc7\u6ee4\u65f6\u53ea\u5217\u57fa\u56e0\u6570\uff0c\u4f1a\u8bef\u4ee5\u4e3a\u8fd9\u4e00\u6b65\u6ca1\u6709\u6539\u53d8\u4efb\u4f55\u89c2\u6d4b\u3002\u5e94\u8be5\u540c\u65f6\u5217\u8f6c\u5f55\u672c\u6570\uff0c\u5e76\u5728\u76ee\u6807\u57fa\u56e0\u5185\u91cd\u65b0\u7b97\u5404\u4e2a\u7ec4\u6210\u5206\u6bcd\u3002<\/p>\n<p style=\"border-top:1px solid #DAE6F2;margin-top:2em;padding-top:1em;\">\u628a\u8fd9\u4efd\u5c0f\u4f8b\u6362\u6210\u81ea\u5df1\u7684\u6837\u672c\u5e76\u6838\u5bf9\u7ed3\u679c\u540e\uff0c\u5982\u679c\u8fd8\u6709\u591a\u4e2a\u961f\u5217\u9700\u8981\u91cd\u590d\u5206\u6790\uff0c\u53ef\u4ee5\u628a\u56fa\u5b9a\u7248\u672c\u7684 R \u73af\u5883\u548c\u811a\u672c\u653e\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\u7ee7\u7eed\u8fd0\u884c\u3002<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u4e09\u79cd\u8f6c\u5f55\u672c\u539f\u8ba1\u6570\u516d\u5341\u3001\u4e09\u5341\u3001\u5341\u3002<\/p>\n","protected":false},"author":1,"featured_media":68657,"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":[757,728,750],"class_list":["post-68658","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-part","category-transcriptomics","tag-drimseq","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-drimseq-practice-9c04cd8c.png?fit=1120%2C690&ssl=1","_links":{"self":[{"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/posts\/68658","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=68658"}],"version-history":[{"count":3,"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/posts\/68658\/revisions"}],"predecessor-version":[{"id":70812,"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/posts\/68658\/revisions\/70812"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/media\/68657"}],"wp:attachment":[{"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/media?parent=68658"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/categories?post=68658"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/tags?post=68658"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}