{"id":68753,"date":"2026-12-05T09:10:34","date_gmt":"2026-12-05T01:10:34","guid":{"rendered":"https:\/\/www.biocloudservice.com\/wordpress\/?p=68753"},"modified":"2026-12-05T09:10:34","modified_gmt":"2026-12-05T01:10:34","slug":"r-guide-qtl2-practice","status":"publish","type":"post","link":"https:\/\/www.biocloudservice.com\/wordpress\/r-guide-qtl2-practice\/","title":{"rendered":"qtl2 \u7684 QTL \u5cf0\u8d85\u8fc7\u4e86\u9608\u503c\u5417\uff1f\u6559\u4f60\u6838\u5bf9\u626b\u63cf\u548c\u7f6e\u6362\u7684\u8bbe\u8ba1"},"content":{"rendered":"<div class=\"ysx-r-practice\" id=\"ysx-r-qtl2\" 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\u6807\u8bb0\u7684 LOD \u5f88\u9ad8\uff0c\u5e76\u4e0d\u80fd\u76f4\u63a5\u56de\u7b54\u5168\u57fa\u56e0\u7ec4\u626b\u63cf\u662f\u5426\u8d8a\u8fc7\u9608\u503c\u3002QTL \u7f6e\u6362\u8981\u5728\u6bcf\u4e00\u6b21\u91cd\u65b0\u5206\u914d\u540e\u53d6\u6574\u6761\u626b\u63cf\u7684\u6700\u5927\u503c\uff0c\u5e76\u9075\u5b88\u5b9e\u9a8c\u8bbe\u8ba1\u7ed9\u51fa\u7684\u53ef\u4ea4\u6362\u8303\u56f4\u3002<\/p>\n<h2 style=\"margin:2em 0 .6em;color:#205CAC;font-size:1.38em;line-height:1.5;\">qtl2 \u7684\u8f93\u5165\u548c\u5206\u6790\u5bf9\u8c61<\/h2>\n<p style=\"margin:.5em 0 1em\">cross \u662f\u5df2\u8bfb\u5165\u7684 qtl2 cross2 \u5bf9\u8c61\u3002pheno \u4e3a\u5e26\u4e2a\u4f53\u884c\u540d\u7684\u5b9a\u91cf\u8868\u578b\u77e9\u9635\uff0c\u4e0e\u57fa\u56e0\u578b\u6982\u7387\u4e2a\u4f53\u5339\u914d\u3002\u793a\u4f8b\u9002\u7528\u53ef\u81ea\u7531\u4ea4\u6362\u7684\u4e2a\u4f53\u3002<\/p>\n<p style=\"margin:.5em 0 1em\">\u626b\u63cfQTL\u65f6\uff0c\u9700\u8981\u5224\u65ad\u67d0\u4e2a\u5cf0\u503c\u662f\u5426\u663e\u8457\uff0c\u8fd9\u4f9d\u8d56\u4e8e\u7f6e\u6362\u5206\u6790\u5f97\u5230\u7684\u9608\u503c\u3002\u7f6e\u6362\u5206\u6790\u7684\u76ee\u7684\u662f\u6a21\u62df\u968f\u673a\u60c5\u51b5\u4e0b\u5f97\u5230\u7684\u6700\u5927LOD\u503c\u5206\u5e03\uff0c\u4ece\u800c\u786e\u5b9a\u4e00\u4e2a\u5408\u7406\u7684\u9608\u503c\u3002\u5982\u679c\u67d0\u4e2a\u5b9e\u9645\u626b\u63cf\u5f97\u5230\u7684\u5cf0\u503c\u8d85\u8fc7\u4e86\u8fd9\u4e2a\u9608\u503c\uff0c\u5c31\u53ef\u4ee5\u8ba4\u4e3a\u8be5\u4f4d\u7f6e\u5b58\u5728\u663e\u8457\u7684QTL\u6548\u5e94\u3002\u5728qtl2\u4e2d\uff0c\u7f6e\u6362\u8fc7\u7a0b\u9700\u8981\u4e0e\u539f\u59cb\u626b\u63cf\u4f7f\u7528\u76f8\u540c\u7684\u57fa\u56e0\u578b\u6982\u7387\u3001\u534f\u53d8\u91cf\u548c\u8bbe\u8ba1\u7ed3\u6784\uff0c\u4ee5\u786e\u4fdd\u7ed3\u679c\u7684\u53ef\u6bd4\u6027\u3002\u5982\u679c\u8bbe\u8ba1\u4e0d\u4e00\u81f4\uff0c\u7f6e\u6362\u7ed3\u679c\u4f1a\u8bef\u5bfc\u9608\u503c\u4f30\u8ba1\uff0c\u5bfc\u81f4\u9519\u8bef\u7684\u663e\u8457\u6027\u5224\u65ad\u3002\u56e0\u6b64\uff0c\u626b\u63cf\u548c\u7f6e\u6362\u7684\u8f93\u5165\u5bf9\u8c61\u5fc5\u987b\u5b8c\u5168\u5339\u914d\uff0c\u5305\u62ec\u4ea4\u914d\u7c7b\u578b\u3001\u57fa\u56e0\u578b\u6982\u7387\u3001\u534f\u53d8\u91cf\u548c\u8868\u578b\u7ed3\u6784\u3002<\/p>\n<p style=\"margin:.5em 0 1em\">\u7f6e\u6362\u5206\u6790\u7684\u8f93\u5165\u5bf9\u8c61\u9700\u8981\u4e0e\u626b\u63cf\u5206\u6790\u4e00\u81f4\uff0c\u5305\u62ec\u57fa\u56e0\u578b\u6982\u7387\u3001\u8868\u578b\u548c\u534f\u53d8\u91cf\u3002\u5982\u679c\u57fa\u56e0\u578b\u6982\u7387\u6765\u81ea\u4e0d\u540c\u7684\u4ea4\u914d\u8bbe\u8ba1\uff0c\u7f6e\u6362\u4f1a\u4f7f\u7528\u9519\u8bef\u7684\u9057\u4f20\u7ed3\u6784\uff0c\u4ece\u800c\u5f71\u54cd\u7f6e\u6362\u9608\u503c\u7684\u4f30\u8ba1\u3002\u4f8b\u5982\uff0c\u5982\u679c\u626b\u63cf\u4f7f\u7528\u7684\u662f\u56de\u4ea4\u8bbe\u8ba1\uff0c\u7f6e\u6362\u4e5f\u5fc5\u987b\u4f7f\u7528\u56de\u4ea4\u8bbe\u8ba1\u7684\u57fa\u56e0\u578b\u6982\u7387\uff0c\u4e0d\u80fd\u6df7\u7528\u5176\u4ed6\u8bbe\u8ba1\u7684\u57fa\u56e0\u578b\u6982\u7387\u3002\u6b64\u5916\uff0c\u534f\u53d8\u91cf\u7684\u5904\u7406\u65b9\u5f0f\u4e5f\u5fc5\u987b\u4e00\u81f4\uff0c\u6bd4\u5982\u6027\u522b\u534f\u53d8\u91cf\u7684\u7f16\u7801\u65b9\u5f0f\u3001X\u67d3\u8272\u4f53\u534f\u53d8\u91cf\u7684\u5904\u7406\u7b49\u3002\u5982\u679c\u8fd9\u4e9b\u7ed3\u6784\u4e0d\u4e00\u81f4\uff0c\u7f6e\u6362\u9608\u503c\u4f1a\u504f\u9ad8\u6216\u504f\u4f4e\uff0c\u5bfc\u81f4\u9519\u8bef\u7684\u663e\u8457\u6027\u5224\u65ad\u3002\u56e0\u6b64\uff0c\u7f6e\u6362\u5206\u6790\u7684\u8f93\u5165\u5fc5\u987b\u4e0e\u539f\u59cb\u626b\u63cf\u5b8c\u5168\u5339\u914d\uff0c\u624d\u80fd\u5f97\u5230\u53ef\u9760\u7684\u9608\u503c\u3002<\/p>\n<p style=\"margin:.5em 0 1em\">\u7f6e\u6362\u5206\u6790\u7684\u9608\u503c\u7531\u5927\u91cf\u7f6e\u6362\u91cd\u590d\u5f97\u5230\u7684\u6700\u5927LOD\u503c\u5206\u5e03\u51b3\u5b9a\u3002\u5982\u679c\u7f6e\u6362\u6b21\u6570\u592a\u5c11\uff0c\u9608\u503c\u4f30\u8ba1\u4f1a\u4e0d\u7a33\u5b9a\uff0c\u5bb9\u6613\u51fa\u73b0\u5076\u7136\u7684\u9ad8\u9608\u503c\u3002\u5728\u6559\u5b66\u793a\u4f8b\u4e2d\uff0c\u7f6e\u6362\u5206\u6790\u5f97\u5230\u7684\u9608\u503c\u662f\u57fa\u4e8e\u591a\u4e2a\u7f6e\u6362\u91cd\u590d\u7684\u6700\u5927LOD\u503c\u5206\u5e03\u8ba1\u7b97\u7684\uff0c\u800c\u4e0d\u662f\u7b80\u5355\u7684\u5c06\u6240\u6709\u6807\u8bb0\u7684LOD\u503c\u62fc\u5728\u4e00\u8d77\u53d6\u5206\u4f4d\u6570\u3002\u8fd9\u79cd\u505a\u6cd5\u4f1a\u5ffd\u7565\u7f6e\u6362\u7684\u7edf\u8ba1\u5355\u4f4d\uff0c\u5bfc\u81f4\u9608\u503c\u4f30\u8ba1\u9519\u8bef\u3002\u6bcf\u4e2a\u7f6e\u6362\u91cd\u590d\u90fd\u5bf9\u5e94\u4e00\u6b21\u5b8c\u6574\u7684\u626b\u63cf\u8fc7\u7a0b\uff0c\u7f6e\u6362\u7684\u6700\u5927LOD\u503c\u662f\u8be5\u6b21\u626b\u63cf\u4e2d\u7684\u6700\u5927\u503c\uff0c\u800c\u4e0d\u662f\u6240\u6709\u6807\u8bb0\u7684LOD\u503c\u7684\u7b80\u5355\u7ec4\u5408\u3002\u56e0\u6b64\uff0c\u7f6e\u6362\u9608\u503c\u7684\u8ba1\u7b97\u5fc5\u987b\u57fa\u4e8e\u7f6e\u6362\u91cd\u590d\u7684\u6700\u5927\u503c\u5206\u5e03\uff0c\u800c\u975e\u6240\u6709\u6807\u8bb0\u7684LOD\u503c\u3002<\/p>\n<p style=\"margin:.5em 0 1em\">\u7528\u56fe\u8c31\u548c\u4ea4\u914d\u8bbe\u8ba1\u8c03\u7528 <code>calc_genoprob()<\/code>\uff0c<code>scan1()<\/code> \u626b\u63cf\u8868\u578b\uff0c\u518d\u4ee5\u5339\u914d\u7684\u57fa\u56e0\u578b\u6982\u7387\u3001\u534f\u53d8\u91cf\u548c\u8bbe\u8ba1\u8fd0\u884c <code>scan1perm()<\/code> \u5f97\u5230\u9608\u503c\u3002 <a href=\"https:\/\/cran.r-project.org\/web\/packages\/qtl2\/refman\/qtl2.html#scan1perm\" style=\"color:#185CB7;text-decoration:underline;\">qtl2 CRAN \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;\">gp &lt;- qtl2::calc_genoprob(cross,error_prob=.002)\nlod &lt;- qtl2::scan1(gp,pheno)\nset.seed(26)\nperm &lt;- qtl2::scan1perm(gp,pheno,n_perm=100)\nsummary(perm,alpha=.05)\n<\/code><\/pre>\n<h2 style=\"margin:2em 0 .6em;color:#205CAC;font-size:1.38em;line-height:1.5;\">\u6bcf\u6b21\u5168\u57fa\u56e0\u7ec4\u91cd\u6392\u90fd\u53d6\u6700\u5927\u503c<\/h2>\n<p style=\"margin:.5em 0 1em\">\u4e09\u8f6e\u6559\u5b66\u626b\u63cf\u5404\u4e09\u4e2a\u6807\u8bb0\uff0c\u8f6e\u5185\u6700\u5927\u503c\u4e3a\u4e09\u3001\u56db\u3001\u4e8c\u3002\u6b63\u5f0f\u9608\u503c\u6765\u81ea\u8bb8\u591a\u8f6e\u6700\u5927\u503c\u5206\u5e03\uff0c\u4e09\u8f6e\u4ec5\u7528\u4e8e\u89e3\u91ca\u7edf\u8ba1\u5355\u4f4d\u3002\u4e0d\u53ef\u628a\u4e5d\u4e2a\u70b9\u76f4\u63a5\u62fc\u5728\u4e00\u8d77\u53d6\u5206\u4f4d\u6570\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;- apply(matrix(c(1,3,2,2,4,1,1,2,2),nrow=3,byrow=TRUE),1,max)\nnames(v) &lt;- c(\"\u7f6e\u6362\u4e00\u6700\u5927\", \"\u7f6e\u6362\u4e8c\u6700\u5927\", \"\u7f6e\u6362\u4e09\u6700\u5927\")\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;\">\u7f6e\u6362\u4e00\u6700\u5927<\/td>\n<td style=\"border-bottom:1px solid #CBDEEB;text-align:left;padding:8px;background:#FFF;\">3<\/td>\n<\/tr>\n<tr>\n<td style=\"border-bottom:1px solid #CBDEEB;text-align:left;padding:8px;background:#FFF;\">\u7f6e\u6362\u4e8c\u6700\u5927<\/td>\n<td style=\"border-bottom:1px solid #CBDEEB;text-align:left;padding:8px;background:#FFF;\">4<\/td>\n<\/tr>\n<tr>\n<td style=\"border-bottom:1px solid #CBDEEB;text-align:left;padding:8px;background:#FFF;\">\u7f6e\u6362\u4e09\u6700\u5927<\/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-qtl2-practice-4129584d.png?resize=1120%2C690&#038;ssl=1\" alt=\"\u6bcf\u6b21\u5168\u57fa\u56e0\u7ec4\u91cd\u6392\u90fd\u53d6\u6700\u5927\u503c\u3002\u7f6e\u6362\u4e00\u6700\u5927 3\uff0c\u7f6e\u6362\u4e8c\u6700\u5927 4\uff0c\u7f6e\u6362\u4e09\u6700\u5927 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;\">\u53d7\u7ea6\u675f\u7f6e\u6362\u662f\u4e0d\u662f\u4ecd\u7136\u4fdd\u7559\u4e86\u5c42\u5185\u4eba\u6570\uff1f<\/h2>\n<p style=\"margin:.5em 0 1em\">\u7d22\u5f15\u53ea\u5728\u4e24\u4e2a\u5757\u5185\u4ea4\u6362\uff0c\u6240\u4ee5\u6bcf\u4e2a\u539f\u4f4d\u7f6e\u6536\u5230\u7684\u4ecd\u662f\u540c\u5757\u89c2\u6d4b\u3002\u771f\u5b9e\u6570\u636e\u662f\u5426\u53ef\u4ee5\u8fd9\u6837\u6362\u53d6\u51b3\u4e8e\u4ea4\u914d\u65b9\u6848\u3001\u73af\u5883\u4e0e\u534f\u53d8\u91cf\uff0c\u4e0d\u80fd\u4ec5\u51ed\u201c\u6709\u4e00\u4e2a\u5bb6\u7cfb\u5217\u201d\u5c31\u673a\u68b0\u5730\u9009\u7528\u4e00\u79cd\u7f6e\u6362\u8bbe\u8ba1\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;\">block &lt;- c(\"a\",\"a\",\"b\",\"b\")\ny &lt;- c(1,2,8,9)\nix &lt;- c(2,1,4,3)\nc(legal=all(block[ix]==block),unchanged=sum(y[ix]==y))\n<\/code><\/pre>\n<p style=\"margin:.5em 0 1em\">\u5728qtl2\u7684\u7f6e\u6362\u5206\u6790\u4e2d\uff0c\u4e00\u4e2a\u5e38\u89c1\u4f46\u5bb9\u6613\u88ab\u5ffd\u89c6\u7684\u95ee\u9898\u662f\u4ea4\u914d\u7c7b\u578b\u4e0d\u5339\u914d\u3002\u626b\u63cf\u5206\u6790\u4f7f\u7528\u7684\u662fF2\u7fa4\u4f53\u7684\u57fa\u56e0\u578b\u6982\u7387\uff0c\u800c\u7f6e\u6362\u8fc7\u7a0b\u5374\u9519\u8bef\u5730\u4f7f\u7528\u4e86\u56de\u4ea4\u7fa4\u4f53\u7684\u6982\u7387\u3002\u8fd9\u79cd\u8bbe\u7f6e\u4f1a\u5bfc\u81f4\u7f6e\u6362\u9608\u503c\u4e25\u91cd\u504f\u9ad8\uff0c\u4f7f\u5f97\u539f\u672c\u5177\u6709\u663e\u8457\u6548\u5e94\u7684QTL\u88ab\u9519\u8bef\u5730\u5224\u65ad\u4e3a\u4e0d\u663e\u8457\u3002\u56e0\u4e3a\u4e0d\u540c\u4ea4\u914d\u7c7b\u578b\u4e0b\u57fa\u56e0\u578b\u6982\u7387\u7684\u8ba1\u7b97\u65b9\u5f0f\u4e0d\u540c\uff0c\u7f6e\u6362\u7ed3\u679c\u65e0\u6cd5\u53cd\u6620\u771f\u5b9e\u7684\u968f\u673a\u5206\u5e03\u60c5\u51b5\u3002\u5982\u679c\u626b\u63cf\u548c\u7f6e\u6362\u4f7f\u7528\u4e86\u4e0d\u540c\u7684\u4ea4\u914d\u8bbe\u8ba1\uff0c\u7f6e\u6362\u9608\u503c\u5c31\u5931\u53bb\u4e86\u5e94\u6709\u7684\u53c2\u8003\u4ef7\u503c\u3002\u56e0\u6b64\uff0c\u5fc5\u987b\u786e\u4fdd\u7f6e\u6362\u5206\u6790\u6240\u7528\u7684\u57fa\u56e0\u578b\u6982\u7387\u4e0e\u626b\u63cf\u5206\u6790\u5b8c\u5168\u4e00\u81f4\uff0c\u624d\u80fd\u5f97\u5230\u53ef\u9760\u7684\u663e\u8457\u6027\u5224\u65ad\u3002<\/p>\n<p style=\"margin:.5em 0 1em\">\u7f6e\u6362\u5206\u6790\u4e2d\u7684\u534f\u53d8\u91cf\u5904\u7406\u5982\u679c\u4e0d\u4e00\u81f4\uff0c\u4e5f\u4f1a\u5bfc\u81f4\u8bef\u8bfb\u3002\u4f8b\u5982\uff0c\u5728\u626b\u63cf\u4e2d\u4f7f\u7528\u4e86\u6027\u522b\u4f5c\u4e3a\u534f\u53d8\u91cf\uff0c\u4f46\u5728\u7f6e\u6362\u8fc7\u7a0b\u4e2d\u5374\u5ffd\u7565\u4e86\u8fd9\u4e00\u534f\u53d8\u91cf\u7684\u5904\u7406\u65b9\u5f0f\u3002\u8fd9\u79cd\u4e0d\u4e00\u81f4\u6027\u4f1a\u4f7f\u5f97\u7f6e\u6362\u9608\u503c\u4f30\u8ba1\u504f\u79bb\u5b9e\u9645\u503c\uff0c\u4ece\u800c\u5f71\u54cd\u6700\u7ec8\u7684\u663e\u8457\u6027\u5224\u65ad\u3002\u5373\u4f7f\u534f\u53d8\u91cf\u7684\u6570\u503c\u76f8\u540c\uff0c\u5982\u679c\u5904\u7406\u65b9\u5f0f\u4e0d\u540c\uff0c\u6bd4\u5982\u6027\u522b\u53d8\u91cf\u5728\u626b\u63cf\u4e2d\u88ab\u7f16\u7801\u4e3a1\u548c2\uff0c\u800c\u5728\u7f6e\u6362\u4e2d\u88ab\u7f16\u7801\u4e3a0\u548c1\uff0c\u7f6e\u6362\u9608\u503c\u4e5f\u4f1a\u4ea7\u751f\u504f\u5dee\u3002\u7f6e\u6362\u5206\u6790\u5fc5\u987b\u4e0e\u626b\u63cf\u5206\u6790\u4fdd\u6301\u5b8c\u5168\u76f8\u540c\u7684\u534f\u53d8\u91cf\u5904\u7406\u903b\u8f91\uff0c\u5305\u62ec\u53d8\u91cf\u540d\u79f0\u3001\u7f16\u7801\u65b9\u5f0f\u548c\u5904\u7406\u51fd\u6570\u3002\u5982\u679c\u8fd9\u4e9b\u8bbe\u7f6e\u4e0d\u4e00\u81f4\uff0c\u7f6e\u6362\u9608\u503c\u7684\u4f30\u8ba1\u5c31\u65e0\u6cd5\u51c6\u786e\u53cd\u6620\u771f\u5b9e\u968f\u673a\u60c5\u51b5\u4e0b\u7684\u6700\u5927LOD\u5206\u5e03\u3002<\/p>\n<h2 style=\"margin:2em 0 .6em;color:#205CAC;font-size:1.38em;line-height:1.5;\">\u7528 qtl2 \u7684\u5c0f\u9f20\u6742\u4ea4\u793a\u4f8b\u5b9e\u9645\u8ba1\u7b97\u4e00\u6761\u67d3\u8272\u4f53\u7684\u57fa\u56e0\u578b\u6982\u7387<\/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;\">cross&lt;-qtl2::read_cross2(system.file(\"extdata\",\"iron.zip\",package=\"qtl2\"))\nsub&lt;-cross[,names(cross$gmap)[1]]\npr&lt;-qtl2::calc_genoprob(sub,error_prob=.002)\na&lt;-pr[[1]]\nc(length(pr),dim(a)[3],dim(a)[1])\n<\/code><\/pre>\n<p style=\"margin:.5em 0 1em\">\u5728 R 4.5.2\u3001qtl2 0.46 \u4e2d\u8fd0\u884c\uff0c\u8f93\u51fa\u4f9d\u6b21\u4e3a\u67d3\u8272\u4f53 1\uff0c\u9057\u4f20\u6807\u8bb0\u4f4d\u7f6e 3\uff0c\u4e2a\u4f53 284\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\">\u4ea4\u914d\u7c7b\u578b\u3001\u9057\u4f20\u8ddd\u79bb\u548c\u5bb6\u7cfb\u7ed3\u6784\u4f1a\u5f71\u54cd\u6982\u7387\u4e0e\u7f6e\u6362\u3002\u5b58\u5728\u5206\u5c42\u8bbe\u8ba1\u65f6\uff0c\u91c7\u7528\u4e0e\u8bbe\u8ba1\u76f8\u7b26\u7684\u7f6e\u6362\u5206\u5c42\u3002<\/p>\n<p style=\"margin:.5em 0 1em\">\u7f6e\u6362\u9608\u503c\u7684\u4f30\u8ba1\u5bf9\u7f6e\u6362\u6b21\u6570\u7684\u8bbe\u7f6e\u975e\u5e38\u654f\u611f\uff0c\u7279\u522b\u662f\u5728\u6837\u672c\u91cf\u8f83\u5c0f\u7684\u60c5\u51b5\u4e0b\u3002\u5982\u679c\u7f6e\u6362\u6b21\u6570\u8bbe\u7f6e\u8fc7\u5c11\uff0c\u4f8b\u5982\u53ea\u670910\u6b21\u7f6e\u6362\u91cd\u590d\uff0c\u9608\u503c\u4f30\u8ba1\u4f1a\u975e\u5e38\u4e0d\u7a33\u5b9a\uff0c\u5bb9\u6613\u51fa\u73b0\u5076\u7136\u7684\u9ad8\u9608\u503c\u3002\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u5373\u4f7f\u626b\u63cf\u5f97\u5230\u7684\u5cf0\u503c\u5177\u6709\u5b9e\u9645\u663e\u8457\u6027\uff0c\u4e5f\u53ef\u80fd\u56e0\u4e3a\u9608\u503c\u4f30\u8ba1\u4e0d\u51c6\u786e\u800c\u88ab\u8bef\u5224\u4e3a\u4e0d\u663e\u8457\u3002\u5982\u679c\u7f6e\u6362\u6b21\u6570\u592a\u5c11\uff0c\u5e94\u589e\u52a0\u91cd\u590d\u6b21\u6570\uff0c\u76f4\u5230\u9608\u503c\u4f30\u8ba1\u8d8b\u4e8e\u7a33\u5b9a\u4e3a\u6b62\u3002<\/p>\n<p style=\"margin:.5em 0 1em\">\u7f6e\u6362\u5206\u6790\u4e2d\u662f\u5426\u8003\u8651X\u67d3\u8272\u4f53\u534f\u53d8\u91cf\u4e5f\u4f1a\u5f71\u54cd\u9608\u503c\u4f30\u8ba1\u3002\u5982\u679c\u626b\u63cf\u5206\u6790\u4e2d\u5305\u542b\u4e86X\u67d3\u8272\u4f53\u534f\u53d8\u91cf\u7684\u5904\u7406\uff0c\u7f6e\u6362\u5206\u6790\u4e5f\u5fc5\u987b\u4fdd\u6301\u4e00\u81f4\u3002\u4f8b\u5982\uff0c\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0cX\u67d3\u8272\u4f53\u4e0a\u7684QTL\u6548\u5e94\u53ef\u80fd\u88ab\u9519\u8bef\u5730\u5f52\u56e0\u4e8e\u5e38\u67d3\u8272\u4f53\uff0c\u5982\u679c\u7f6e\u6362\u5206\u6790\u6ca1\u6709\u6b63\u786e\u5904\u7406X\u67d3\u8272\u4f53\u534f\u53d8\u91cf\uff0c\u8fd9\u79cd\u9519\u8bef\u4f1a\u6301\u7eed\u5b58\u5728\u3002\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u5373\u4f7f\u626b\u63cf\u7ed3\u679c\u663e\u8457\uff0c\u7f6e\u6362\u9608\u503c\u7684\u4f30\u8ba1\u4e5f\u4f1a\u9519\u8bef\u5730\u9ad8\u4e8e\u5b9e\u9645\u503c\u3002\u56e0\u6b64\uff0c\u7f6e\u6362\u5206\u6790\u5fc5\u987b\u4e0e\u626b\u63cf\u5206\u6790\u5728X\u67d3\u8272\u4f53\u534f\u53d8\u91cf\u5904\u7406\u4e0a\u4fdd\u6301\u4e00\u81f4\uff0c\u624d\u80fd\u5f97\u5230\u6b63\u786e\u7684\u9608\u503c\u4f30\u8ba1\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\">\u5728\u5c0f\u9f20\u6742\u4ea4\u6570\u636e\u4e2d\u5148\u6838\u5bf9\u9057\u4f20\u56fe\u8c31\u4f4d\u7f6e\u4e0e\u57fa\u56e0\u578b\u6982\u7387\u7684\u67d3\u8272\u4f53\u3001\u6807\u8bb0\u987a\u5e8f\u548c\u4e2a\u4f53\u540d\u3002\u626b\u63cf\u7edf\u8ba1\u91cf\u7684\u6700\u9ad8\u70b9\u9700\u8981\u548c\u5bf9\u5e94\u8bbe\u8ba1\u4e0b\u7684\u7f6e\u6362\u9608\u503c\u6bd4\u8f83\u3002\u82e5\u5b9e\u9a8c\u6709\u5bb6\u7cfb\u3001\u6279\u6b21\u6216\u4e0d\u80fd\u4efb\u610f\u4ea4\u6362\u7684\u5904\u7406\u5355\u4f4d\uff0c\u968f\u610f\u6253\u4e71\u4e2a\u4f53\u4f1a\u7834\u574f\u96f6\u5047\u8bbe\u6240\u4f9d\u8d56\u7684\u7ed3\u6784\u3002\u56fe\u4e0a\u7684\u5c16\u5cf0\u7ed9\u51fa\u7684\u662f\u6807\u8bb0\u9644\u8fd1\u7684\u5173\u8054\u533a\u95f4\uff0c\u62a5\u544a\u65f6\u5e94\u6ce8\u660e\u6240\u7528\u9057\u4f20\u56fe\u8c31\u4e0e\u7f6e\u4fe1\u533a\u95f4\uff0c\u624d\u4fbf\u4e8e\u5bf9\u63a5\u5019\u9009\u57fa\u56e0\u548c\u9a8c\u8bc1\u6742\u4ea4\u3002<\/p>\n<p style=\"margin:.5em 0 1em\">\u6311\u4e00\u4e2a\u6709\u8db3\u591f\u8986\u76d6\u3001\u6807\u8bc6\u660e\u786e\u7684\u4f4d\u7f6e\uff0c\u628a\u8be5\u4f4d\u7f6e\u7684\u4e24\u4e2a\u7b49\u4f4d\u3001\u4f7f\u7528\u7684\u53c2\u8003\u7248\u672c\u548c\u6837\u672c\u987a\u5e8f\u9010\u9879\u6838\u5bf9\u3002\u82e5\u8d44\u6599\u53ea\u6709\u6c47\u603b\u7edf\u8ba1\uff0c\u4e5f\u8981\u628a\u6548\u5e94\u65b9\u5411\u8ffd\u5230\u5177\u4f53\u7684\u7b49\u4f4d\u5b9a\u4e49\u3002\u4e00\u4e2a\u7b49\u4f4d\u540d\u79f0\u5199\u53cd\uff0c\u5e38\u4f1a\u7559\u4e0b\u770b\u4f3c\u5408\u7406\u7684\u7edd\u5bf9\u503c\uff0c\u5374\u628a\u65b9\u5411\u98a0\u5012\u3002\u5bf9\u6765\u81ea\u4e0d\u540c\u53c2\u8003\u9762\u677f\u7684\u8d44\u6599\uff0c\u9891\u7387\u76f8\u8fd1\u662f\u4e00\u79cd\u652f\u6301\uff0c\u9891\u7387\u4e0d\u76f8\u8fd1\u8fd8\u53ef\u80fd\u6d89\u53ca\u7956\u6e90\u3001\u6d4b\u5e8f\u8303\u56f4\u548c\u6837\u672c\u9009\u62e9\uff0c\u4e0d\u80fd\u5355\u51ed\u4e00\u5217\u9891\u7387\u81ea\u52a8\u7ffb\u8f6c\u3002<\/p>\n<p style=\"margin:.5em 0 1em\">\u518d\u628a\u8be5\u4f4d\u70b9\u653e\u56de\u5468\u56f4\u7684\u8bc1\u636e\u4e2d\u3002\u82e5\u4f9d\u8d56\u90bb\u8fd1\u6807\u8bb0\u6216\u6210\u7247\u4fe1\u53f7\uff0c\u8bb0\u5f55\u90bb\u8fd1\u6807\u8bb0\u7684\u5bc6\u5ea6\u3001\u53ef\u7528\u89c2\u6d4b\u6570\u53ca\u79bb\u6700\u8fd1\u4e00\u4e2a\u6709\u6548\u4f4d\u7f6e\u591a\u8fdc\u3002\u82e5\u4f9d\u8d56\u4e2a\u4f53\u5c42\u91cd\u590d\u6216\u8868\u578b\u5173\u8054\uff0c\u5219\u6309\u4eba\u7edf\u8ba1\u5b9e\u9645\u53c2\u4e0e\u4f30\u8ba1\u7684\u6837\u672c\u6570\u3002\u8fd9\u6837\u80fd\u8bc6\u522b\u4e00\u79cd\u5f88\u5e38\u89c1\u7684\u843d\u5dee\uff0c\u6587\u4ef6\u6709\u8bb8\u591a\u884c\u6216\u6a21\u578b\u7ed9\u51fa\u5f88\u7a84\u7684\u5019\u9009\u5217\u8868\uff0c\u4f46\u652f\u6491\u8fd9\u4e2a\u5c40\u90e8\u7ed3\u8bba\u7684\u72ec\u7acb\u89c2\u6d4b\u5e76\u6ca1\u6709\u770b\u8d77\u6765\u90a3\u4e48\u591a\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\/075-qtl2-code-92804598933bd7a5.zip\">\u4e0b\u8f7d\u672c\u7bc7 R \u4ee3\u7801\uff08ZIP\uff0c3.6 KiB\uff09<\/a> \u00b7 <a style=\"color:#1458a5;text-decoration:underline;\" href=\"https:\/\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/r-practice-labs\/075-qtl2-data-be312e8be138efba.zip\">\u4e0b\u8f7d\u914d\u5957\u793a\u4f8b\u6570\u636e\uff08ZIP\uff0c12.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;\">075-qtl2<\/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 qtl2 \u7684\u5c0f\u9f20\u6742\u4ea4\u793a\u4f8b\u5b9e\u9645\u8ba1\u7b97\u4e00\u6761\u67d3\u8272\u4f53\u7684\u57fa\u56e0\u578b\u6982\u7387\u201d\u3002Linux x86_64\u3001R 4.5.2\u3001qtl2 0.38 \u7684\u8f93\u51fa\u4e3a\u67d3\u8272\u4f53 1\uff0c\u9057\u4f20\u6807\u8bb0\u4f4d\u7f6e 3\uff0c\u4e2a\u4f53 284\u3002<\/p>\n<p style=\"margin:.5em 0 1em\">\u53d6\u4e00\u53ea\u52a8\u7269\u548c\u4e00\u4e2a\u6807\u8bb0\uff0c\u6cbf\u57fa\u56e0\u578b\u72b6\u6001\u65b9\u5411\u5bf9\u6982\u7387\u6c42\u548c\u3002\u5217\u660e\u6570\u7ec4\u4e2d\u4e2a\u4f53\u3001\u72b6\u6001\u548c\u4f4d\u7f6e\u5404\u5728\u54ea\u4e2a\u7ef4\u5ea6\uff0c\u4e4b\u540e\u62bd\u53d6\u6574\u6761\u67d3\u8272\u4f53\u65f6\u624d\u4e0d\u4f1a\u628a\u6807\u8bb0\u4f4d\u7f6e\u8bef\u4f5c\u6837\u672c\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\">\u7528\u5305\u5185\u7684\u5c0f\u9f20\u6742\u4ea4\u4f8b\u5b50\u5b9e\u9645\u8ba1\u7b97\u4e00\u6761\u67d3\u8272\u4f53\u7684\u57fa\u56e0\u578b\u6982\u7387\u540e\uff0c\u53ef\u76f4\u63a5\u6838\u5bf9\u4e2a\u4f53\u6570\u3001\u4f4d\u7f6e\u6570\u53ca\u6982\u7387\u6570\u7ec4\u7684\u8f74\u3002\u771f\u6b63\u51b3\u5b9a\u626b\u63cf\u9608\u503c\u7684\u662f\u540c\u4e00\u8bbe\u8ba1\u4e0b\u7684\u5168\u57fa\u56e0\u7ec4\u91cd\u6392\u6700\u5927\u503c\u3002\u4e0d\u80fd\u56e0\u4e3a\u6210\u529f\u5efa\u7acb\u6982\u7387\u5bf9\u8c61\uff0c\u5c31\u628a\u6a21\u62df\u6f14\u793a\u7684\u4e09\u8f6e\u91cd\u6392\u5f53\u4f5c\u6b63\u5f0f\u663e\u8457\u6027\u8bc1\u636e\u3002<\/p>\n<p style=\"border-top:1px solid #DAE6F2;margin-top:2em;padding-top:1em;\">\u5f53\u6570\u636e\u4e0e\u4ee3\u7801\u5df2\u7ecf\u5728\u5c0f\u89c4\u6a21\u8f93\u5165\u4e0a\u5bf9\u9f50\uff0c\u540e\u9762\u9700\u8981\u6309\u540c\u4e00\u53e3\u5f84\u5206\u6790\u6574\u6279\u9879\u76ee\u65f6\uff0c\u53ef\u4ee5\u6309\u5b9e\u9645\u4efb\u52a1\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>\u4e09\u8f6e\u6559\u5b66\u626b\u63cf\u5404\u4e09\u4e2a\u6807\u8bb0\uff0c\u8f6e\u5185\u6700\u5927\u503c\u4e3a\u4e09\u3001\u56db\u3001\u4e8c\u3002<\/p>\n","protected":false},"author":1,"featured_media":68752,"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":[800,728,796],"class_list":["post-68753","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-r","category-part","tag-qtl2","tag-r","tag-796"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2026\/11\/r-guide-qtl2-practice-4129584d.png?fit=1120%2C690&ssl=1","_links":{"self":[{"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/posts\/68753","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=68753"}],"version-history":[{"count":3,"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/posts\/68753\/revisions"}],"predecessor-version":[{"id":70862,"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/posts\/68753\/revisions\/70862"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/media\/68752"}],"wp:attachment":[{"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/media?parent=68753"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/categories?post=68753"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/tags?post=68753"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}