{"id":68713,"date":"2026-12-06T09:01:36","date_gmt":"2026-12-06T01:01:36","guid":{"rendered":"https:\/\/www.biocloudservice.com\/wordpress\/?p=68713"},"modified":"2026-12-06T09:01:36","modified_gmt":"2026-12-06T01:01:36","slug":"r-guide-biostrings-practice","status":"publish","type":"post","link":"https:\/\/www.biocloudservice.com\/wordpress\/r-guide-biostrings-practice\/","title":{"rendered":"Biostrings \u7edf\u8ba1\u63a2\u9488\u547d\u4e2d\u65f6\uff0c\u600e\u6837\u907f\u514d\u6f0f\u7b97\u53cd\u5411\u94fe\u6216\u91cd\u590d\u7b97\u56de\u6587\uff1f"},"content":{"rendered":"<div class=\"ysx-r-practice\" id=\"ysx-r-biostrings\" 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\">\u56de\u6587\u63a2\u9488\u7684\u53cd\u5411\u4e92\u8865\u4ecd\u7136\u662f\u5b83\u81ea\u5df1\u3002\u7528 Biostrings \u5206\u522b\u626b\u63cf\u4e24\u6761\u65b9\u5411\uff0c\u53ef\u4ee5\u5f97\u5230\u4e24\u6b21\u5b8c\u5168\u76f8\u540c\u7684\u4f4d\u7f6e\u540d\u5355\u3002\u7edf\u8ba1\u4e0d\u540c\u4f4d\u70b9\u65f6\u5e94\u5408\u5e76\uff0c\u7edf\u8ba1\u5e26\u65b9\u5411\u5339\u914d\u65f6\u5219\u5e94\u660e\u793a\u5355\u4f4d\uff0c\u4e24\u79cd\u8868\u9762\u76f8\u4f3c\u7684\u6570\u5b57\u56de\u7b54\u4e0d\u540c\u95ee\u9898\u3002<\/p>\n<h2 style=\"margin:2em 0 .6em;color:#205CAC;font-size:1.38em;line-height:1.5;\">Biostrings \u7684\u8f93\u5165\u548c\u5206\u6790\u5bf9\u8c61<\/h2>\n<p style=\"margin:.5em 0 1em\">probes \u4e3a\u7b49\u957f\u65e0\u6b67\u4e49 DNAStringSet\u3002chr \u4e3a\u5355\u6761\u67d3\u8272\u4f53 DNAString\u3002\u8fd9\u91cc\u793a\u8303\u7cbe\u786e\u5339\u914d\uff0c\u662f\u5426\u53cc\u94fe\u9700\u4f9d\u5b9e\u9a8c\u3002<\/p>\n<p style=\"margin:.5em 0 1em\">\u5728\u4f7f\u7528 Biostrings \u5305\u8fdb\u884c DNA \u63a2\u9488\u547d\u4e2d\u5206\u6790\u65f6\uff0c\u9700\u8981\u660e\u786e\u76ee\u6807\u662f\u7edf\u8ba1\u7b49\u957f\u63a2\u9488\u5728\u67d3\u8272\u4f53\u4e0a\u7684\u51fa\u73b0\u6b21\u6570\u3002\u63a2\u9488\u901a\u5e38\u4e3a\u65e0\u6b67\u4e49\u7684 DNA \u5e8f\u5217\uff0c\u4ee5 DNAStringSet \u7c7b\u578b\u5b58\u50a8\u3002\u67d3\u8272\u4f53\u5e8f\u5217\u5219\u4ee5\u5355\u6761 DNAString \u5bf9\u8c61\u8868\u793a\u3002\u8fd9\u79cd\u8bbe\u7f6e\u9002\u7528\u4e8e\u63a2\u9488\u547d\u4e2d\u4f4d\u70b9\u7684\u8ba1\u6570\u4efb\u52a1\uff0c\u5c24\u5176\u5728\u5904\u7406\u53cc\u94fe\u9700\u6c42\u65f6\uff0c\u5fc5\u987b\u660e\u786e\u662f\u5426\u8003\u8651\u53cd\u5411\u4e92\u8865\u94fe\u3002\u8f93\u5165\u7684\u63a2\u9488\u5b57\u5178\u6784\u5efa\u4e3a PDict \u5bf9\u8c61\uff0c\u5176\u957f\u5ea6\u4e00\u81f4\u4e14\u4e0d\u542b\u6a21\u7cca\u78b1\u57fa\u3002\u8be5\u5bf9\u8c61\u5728\u540e\u7eed\u5206\u6790\u4e2d\u4f5c\u4e3a\u5339\u914d\u6a21\u677f\uff0c\u5176\u5185\u5bb9\u76f4\u63a5\u51b3\u5b9a\u6700\u7ec8\u547d\u4e2d\u7ed3\u679c\u3002\u8f93\u5165\u7684\u67d3\u8272\u4f53\u5e8f\u5217\u9700\u4e3a\u5b8c\u6574\u5355\u94fe\uff0c\u4e0d\u5305\u542b\u4efb\u4f55\u4fee\u9970\u6216\u63a9\u7801\u4fe1\u606f\u3002\u6b64\u8bbe\u8ba1\u786e\u4fdd\u4e86\u5339\u914d\u8fc7\u7a0b\u7684\u7cbe\u786e\u6027\uff0c\u907f\u514d\u56e0\u8f93\u5165\u9519\u8bef\u5bfc\u81f4\u8ba1\u6570\u504f\u5dee\u3002<\/p>\n<p style=\"margin:.5em 0 1em\">\u5728\u5b9e\u9645\u64cd\u4f5c\u4e2d\uff0c\u9996\u5148\u5c06\u63a2\u9488\u6784\u5efa\u4e3a PDict \u5bf9\u8c61\uff0c\u8be5\u5bf9\u8c61\u53ef\u89c6\u4e3a\u5339\u914d\u7684\u5b57\u5178\u7ed3\u6784\uff0c\u5176\u5185\u90e8\u5b58\u50a8\u4e86\u6240\u6709\u63a2\u9488\u5e8f\u5217\u7684\u7d22\u5f15\u4fe1\u606f\u3002\u968f\u540e\u4f7f\u7528 countPDict \u51fd\u6570\u5bf9\u67d3\u8272\u4f53\u8fdb\u884c\u6279\u91cf\u8ba1\u6570\uff0c\u8be5\u51fd\u6570\u8fd4\u56de\u6bcf\u4e2a\u63a2\u9488\u5728\u67d3\u8272\u4f53\u4e0a\u51fa\u73b0\u7684\u6b21\u6570\u3002\u8bfb\u53d6\u7684\u8f93\u51fa\u5bf9\u8c61\u4e3a\u6574\u6570\u5411\u91cf\uff0c\u5176\u957f\u5ea6\u7b49\u4e8e\u63a2\u9488\u6570\u91cf\u3002\u8be5\u5411\u91cf\u4e2d\u7684\u6bcf\u4e2a\u5143\u7d20\u4ee3\u8868\u5bf9\u5e94\u63a2\u9488\u5728\u67d3\u8272\u4f53\u4e0a\u7684\u547d\u4e2d\u6b21\u6570\u3002\u51fd\u6570\u5185\u90e8\u4f1a\u81ea\u52a8\u5904\u7406\u63a2\u9488\u4e0e\u67d3\u8272\u4f53\u7684\u5339\u914d\u8fc7\u7a0b\uff0c\u5305\u62ec\u9519\u914d\u5bb9\u5fcd\u5ea6\u7684\u63a7\u5236\u3002\u82e5\u672a\u8bbe\u7f6e\u989d\u5916\u53c2\u6570\uff0c\u51fd\u6570\u9ed8\u8ba4\u8fdb\u884c\u7cbe\u786e\u5339\u914d\uff0c\u6b64\u65f6\u8f93\u51fa\u503c\u4e3a 0 \u6216 1\u3002\u82e5\u9700\u8003\u8651\u9519\u914d\uff0c\u53ef\u8bbe\u7f6e max.mismatch \u53c2\u6570\uff0c\u6b64\u65f6\u8f93\u51fa\u503c\u53ef\u80fd\u5927\u4e8e 1\u3002\u901a\u8fc7\u8be5\u6d41\u7a0b\u53ef\u83b7\u53d6\u63a2\u9488\u5728\u67d3\u8272\u4f53\u4e0a\u7684\u547d\u4e2d\u4f4d\u70b9\uff0c\u4e3a\u540e\u7eed\u5206\u6790\u63d0\u4f9b\u57fa\u7840\u6570\u636e\u3002<\/p>\n<p style=\"margin:.5em 0 1em\">\u5c06\u7b49\u957f\u63a2\u9488\u6784\u5efa\u4e3a <code>PDict()<\/code> \u5b57\u5178\uff0c\u5bf9\u6bcf\u6761\u67d3\u8272\u4f53\u7528 <code>countPDict()<\/code> \u6279\u91cf\u8ba1\u6570\u3002\u6709\u53cc\u94fe\u9700\u6c42\u65f6\u663e\u5f0f\u5904\u7406\u53cd\u5411\u4e92\u8865\u53ca\u56de\u6587\u63a2\u9488\u3002 <a href=\"https:\/\/bioconductor.org\/packages\/release\/bioc\/manuals\/Biostrings\/man\/Biostrings.pdf\" style=\"color:#185CB7;text-decoration:underline;\">Biostrings \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;\">pd &lt;- Biostrings::PDict(probes)\nforward &lt;- Biostrings::countPDict(pd,chr)\nis_pal &lt;- as.character(probes)==as.character(Biostrings::reverseComplement(probes))\ndata.frame(probe=as.character(probes),forward=forward,palindrome=is_pal)\n<\/code><\/pre>\n<h2 style=\"margin:2em 0 .6em;color:#205CAC;font-size:1.38em;line-height:1.5;\">\u56de\u6587\u63a2\u9488\u5728 ATAT \u4e2d\u7684\u547d\u4e2d<\/h2>\n<p style=\"margin:.5em 0 1em\">\u4e8c\u78b1\u57fa\u63a2\u9488 AT \u7684\u53cd\u5411\u4e92\u8865\u4ecd\u662f AT\uff0c\u5728 ATAT \u7684\u8d77\u70b9\u4e00\u548c\u4e09\u547d\u4e2d\u3002\u6309\u65e0\u65b9\u5411\u4f4d\u70b9\u8ba1\u4e3a\u4e8c\uff0c\u6309\u4e24\u65b9\u5411\u7d2f\u52a0\u4e3a\u56db\u3002\u5148\u660e\u786e\u76ee\u6807\u5206\u5b50\u548c\u8f93\u51fa\u5355\u4f4d\uff0c\u907f\u514d\u628a\u4f4d\u7f6e\u91cd\u590d\u5f53\u591a\u62f7\u8d1d\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(2,2,length(union(c(1,3),c(1,3))))\nnames(v) &lt;- c(\"\u6b63\u5411\u4f4d\u70b9\", \"\u53cd\u5411\u4e92\u8865\u4f4d\u70b9\", \"\u4e0d\u540c\u4f4d\u70b9\")\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;\">\u6b63\u5411\u4f4d\u70b9<\/td>\n<td style=\"border-bottom:1px solid #CBDEEB;text-align:left;padding:8px;background:#FFF;\">2<\/td>\n<\/tr>\n<tr>\n<td style=\"border-bottom:1px solid #CBDEEB;text-align:left;padding:8px;background:#FFF;\">\u53cd\u5411\u4e92\u8865\u4f4d\u70b9<\/td>\n<td style=\"border-bottom:1px solid #CBDEEB;text-align:left;padding:8px;background:#FFF;\">2<\/td>\n<\/tr>\n<tr>\n<td style=\"border-bottom:1px solid #CBDEEB;text-align:left;padding:8px;background:#FFF;\">\u4e0d\u540c\u4f4d\u70b9<\/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-biostrings-practice-514cd3de.png?resize=1120%2C690&#038;ssl=1\" alt=\"\u56de\u6587\u63a2\u9488\u5728 ATAT \u4e2d\u7684\u547d\u4e2d\u3002\u6b63\u5411\u4f4d\u70b9 2\uff0c\u53cd\u5411\u4e92\u8865\u4f4d\u70b9 2\uff0c\u4e0d\u540c\u4f4d\u70b9 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;\">\u63a2\u9488\u76f8\u540c\u5e8f\u5217\u51fa\u73b0\u5728\u540d\u5355\u4e24\u6b21\u600e\u4e48\u529e\uff1f<\/h2>\n<p style=\"margin:.5em 0 1em\">\u524d\u4e24\u652f\u63a2\u9488\u5e8f\u5217\u5b8c\u5168\u76f8\u540c\u3002\u82e5\u7edf\u8ba1\u72ec\u7279\u5e8f\u5217\u547d\u4e2d\uff0c\u5e94\u5148\u5408\u5e76\u5e8f\u5217\u540e\u628a\u7ed3\u679c\u6620\u5c04\u56de\u539f\u63a2\u9488\u7f16\u53f7\u3002\u82e5\u8f93\u51fa\u9762\u5411\u5b9e\u9a8c\u63a2\u9488\uff0c\u5219\u4fdd\u7559\u4e24\u652f\u63a2\u9488\u7684\u8eab\u4efd\u3002\u7d2f\u52a0\u6240\u6709\u63a2\u9488\u8ba1\u6570\u65f6\u8981\u8bf4\u660e\u5728\u6570\u54ea\u4e00\u79cd\u5b9e\u4f53\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;\">seqs &lt;- c(\"ACT\",\"ACT\",\"GGA\")\ntable(seqs)\n<\/code><\/pre>\n<p style=\"margin:.5em 0 1em\">\u5728\u4e0d\u540c\u53c2\u6570\u8bbe\u7f6e\u4e0b\uff0c\u63a2\u9488\u547d\u4e2d\u7ed3\u679c\u53ef\u80fd\u53d1\u751f\u53d8\u5316\u3002\u82e5\u8bbe\u7f6e max.mismatch=0\uff0c\u5219\u4ec5\u7edf\u8ba1\u7cbe\u786e\u5339\u914d\u7684\u63a2\u9488\u547d\u4e2d\uff0c\u6b64\u65f6\u7ed3\u679c\u8f83\u4e3a\u7a33\u5b9a\u3002\u82e5\u8bbe\u7f6e max.mismatch=1\uff0c\u5219\u5141\u8bb8\u4e00\u4e2a\u9519\u914d\u78b1\u57fa\uff0c\u6b64\u65f6\u547d\u4e2d\u6b21\u6570\u53ef\u80fd\u589e\u52a0\u3002\u82e5\u63a2\u9488\u4e3a\u56de\u6587\u5e8f\u5217\uff0c\u5982 AT\uff0c\u5176\u6b63\u5411\u4e0e\u53cd\u5411\u4e92\u8865\u76f8\u540c\uff0c\u6b64\u65f6\u9700\u660e\u786e\u662f\u5426\u5c06\u5176\u89c6\u4e3a\u4e24\u4e2a\u72ec\u7acb\u547d\u4e2d\u3002\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u9700\u6839\u636e\u5b9e\u9a8c\u8bbe\u8ba1\u9009\u62e9\u662f\u5426\u5141\u8bb8\u9519\u914d\uff0c\u4ee5\u53ca\u662f\u5426\u8003\u8651\u65b9\u5411\u6027\u3002\u82e5\u63a2\u9488\u4e3a\u56de\u6587\u7ed3\u6784\uff0c\u9700\u7279\u522b\u6ce8\u610f\u5176\u5728\u53cd\u5411\u94fe\u4e0a\u7684\u547d\u4e2d\u60c5\u51b5\u3002\u8f93\u51fa\u7ed3\u679c\u4e3a\u6574\u6570\u5411\u91cf\uff0c\u5176\u957f\u5ea6\u7b49\u4e8e\u63a2\u9488\u6570\u91cf\uff0c\u6bcf\u4e2a\u5143\u7d20\u4ee3\u8868\u5bf9\u5e94\u63a2\u9488\u7684\u547d\u4e2d\u6b21\u6570\u3002\u82e5\u63a2\u9488\u5728\u67d3\u8272\u4f53\u4e0a\u672a\u547d\u4e2d\uff0c\u5219\u8f93\u51fa\u4e3a 0\u3002\u901a\u8fc7\u654f\u611f\u6027\u5206\u6790\u53ef\u786e\u8ba4\u8ba1\u7b97\u7ed3\u679c\u7684\u7a33\u5065\u6027\uff0c\u907f\u514d\u56e0\u53c2\u6570\u8bbe\u7f6e\u4e0d\u5f53\u5bfc\u81f4\u7684\u8bef\u5224\u3002<\/p>\n<p style=\"margin:.5em 0 1em\">\u4e3a\u907f\u514d\u6b64\u7c7b\u8bef\u8bfb\uff0c\u5e94\u9996\u5148\u786e\u8ba4\u63a2\u9488\u5b57\u5178\u4e2d\u662f\u5426\u5305\u542b\u56de\u6587\u5e8f\u5217\u3002\u82e5\u5305\u542b\uff0c\u9700\u663e\u5f0f\u8c03\u7528 reverseComplement \u51fd\u6570\u5904\u7406\u53cd\u5411\u4e92\u8865\u94fe\u3002\u5728\u8ba1\u6570\u524d\uff0c\u5e94\u901a\u8fc7\u6bd4\u8f83\u63a2\u9488\u4e0e\u53cd\u5411\u4e92\u8865\u5e8f\u5217\u7684\u7b49\u4ef7\u6027\uff0c\u5224\u65ad\u662f\u5426\u4e3a\u56de\u6587\u7ed3\u6784\u3002\u82e5\u4e3a\u56de\u6587\u5e8f\u5217\uff0c\u5e94\u5355\u72ec\u5904\u7406\u5176\u65b9\u5411\u6027\u8ba1\u6570\uff0c\u907f\u514d\u5c06\u6b63\u53cd\u94fe\u547d\u4e2d\u5408\u5e76\u4e3a\u4e00\u6b21\u3002\u82e5\u672a\u660e\u786e\u533a\u5206\u65b9\u5411\uff0c\u7cfb\u7edf\u5c06\u9ed8\u8ba4\u6309\u4f4d\u70b9\u8ba1\u6570\u65b9\u5f0f\u5904\u7406\uff0c\u4ece\u800c\u5bfc\u81f4\u8ba1\u6570\u4e0d\u51c6\u786e\u3002<\/p>\n<h2 style=\"margin:2em 0 .6em;color:#205CAC;font-size:1.38em;line-height:1.5;\">\u7528\u63a2\u9488\u5b57\u5178\u5b9e\u9645\u8ba1\u6570\u56de\u6587\u5e8f\u5217<\/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;\">q&lt;-Biostrings::DNAStringSet(\"AT\")\nt&lt;-Biostrings::DNAString(\"ATAT\")\na&lt;-Biostrings::countPDict(Biostrings::PDict(q),t)\nb&lt;-Biostrings::countPDict(Biostrings::PDict(Biostrings::reverseComplement(q)),t)\nc(a,b,as.numeric(as.character(q)==as.character(Biostrings::reverseComplement(q))))\n<\/code><\/pre>\n<p style=\"margin:.5em 0 1em\">\u5728 R 4.5.2\u3001Biostrings 2.78.0 \u4e2d\u8fd0\u884c\uff0c\u8f93\u51fa\u4f9d\u6b21\u4e3a\u6b63\u5411\u547d\u4e2d 2\uff0c\u53cd\u5411\u4e92\u8865\u547d\u4e2d 2\uff0c\u5e8f\u5217\u76f8\u7b49 1\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\">\u5148\u660e\u786e\u5141\u8bb8\u7684\u9519\u914d\u6570\u548c\u6a21\u7cca\u78b1\u57fa\u89c4\u5219\uff0c\u7528\u5df2\u77e5\u80fd\u547d\u4e2d\u3001\u4e0d\u80fd\u547d\u4e2d\u7684\u5e8f\u5217\u5bf9\u7167\uff0c\u907f\u514d\u6f0f\u8ba1\u53cd\u5411\u94fe\u6216\u91cd\u590d\u8ba1\u7b97\u3002<\/p>\n<p style=\"margin:.5em 0 1em\">\u5728\u5b9e\u9645\u64cd\u4f5c\u4e2d\uff0c\u82e5\u53d1\u73b0\u67d0\u63a2\u9488\u547d\u4e2d\u6b21\u6570\u5f02\u5e38\uff0c\u5e94\u9996\u5148\u68c0\u67e5\u8be5\u63a2\u9488\u662f\u5426\u4e3a\u56de\u6587\u5e8f\u5217\u3002\u82e5\u4e3a\u56de\u6587\uff0c\u5e94\u68c0\u67e5\u5176\u5728\u67d3\u8272\u4f53\u4e0a\u7684\u5b9e\u9645\u547d\u4e2d\u4f4d\u7f6e\uff0c\u786e\u8ba4\u662f\u5426\u5728\u6b63\u94fe\u548c\u53cd\u94fe\u4e0a\u540c\u65f6\u51fa\u73b0\u3002\u82e5\u672a\u663e\u5f0f\u5904\u7406\u65b9\u5411\u6027\uff0c\u7cfb\u7edf\u53ef\u80fd\u5c06\u4e24\u8005\u5408\u5e76\u4e3a\u4e00\u6b21\u8ba1\u6570\uff0c\u5bfc\u81f4\u7ed3\u679c\u5931\u771f\u3002\u82e5\u53d1\u73b0\u8ba1\u6570\u504f\u5c11\uff0c\u5e94\u68c0\u67e5\u662f\u5426\u9057\u6f0f\u4e86\u53cd\u5411\u94fe\u7684\u547d\u4e2d\u3002\u82e5\u8ba1\u6570\u504f\u591a\uff0c\u5e94\u786e\u8ba4\u662f\u5426\u91cd\u590d\u8ba1\u7b97\u4e86\u53cd\u5411\u94fe\u547d\u4e2d\u3002\u901a\u8fc7\u9010\u4e2a\u6392\u67e5\u63a2\u9488\u65b9\u5411\u6027\uff0c\u53ef\u6709\u6548\u907f\u514d\u56e0\u65b9\u5411\u6027\u8bbe\u7f6e\u4e0d\u5f53\u5bfc\u81f4\u7684\u8bef\u8bfb\u95ee\u9898\u3002\u8fd9\u79cd\u68c0\u67e5\u6d41\u7a0b\u53ef\u786e\u4fdd\u7ed3\u679c\u7b26\u5408\u5b9e\u9a8c\u8bbe\u8ba1\u7684\u9884\u671f\u3002<\/p>\n<p style=\"margin:.5em 0 1em\">\u5728\u63a2\u9488\u547d\u4e2d\u5206\u6790\u4e2d\uff0c\u82e5\u5c06\u65b9\u5411\u6027\u53c2\u6570\u8bbe\u7f6e\u4e3a\u9ed8\u8ba4\u503c\uff0c\u53ef\u80fd\u65e0\u6cd5\u6b63\u786e\u53cd\u6620\u53cc\u94fe\u5b9e\u9a8c\u9700\u6c42\u3002\u4f8b\u5982\uff0c\u5f53\u63a2\u9488\u4e3a\u56de\u6587\u5e8f\u5217\u65f6\uff0c\u82e5\u672a\u663e\u5f0f\u5904\u7406\u53cd\u5411\u4e92\u8865\u94fe\uff0c\u5219\u7cfb\u7edf\u53ef\u80fd\u5c06\u6b63\u53cd\u94fe\u547d\u4e2d\u5408\u5e76\u4e3a\u4e00\u6b21\u8ba1\u6570\u3002\u8fd9\u79cd\u5904\u7406\u65b9\u5f0f\u5728\u5355\u94fe\u5206\u6790\u4e2d\u53ef\u80fd\u5408\u7406\uff0c\u4f46\u5728\u53cc\u94fe\u5b9e\u9a8c\u4e2d\u4f1a\u5bfc\u81f4\u7ed3\u679c\u4e0d\u51c6\u786e\u3002\u82e5\u5c06 max.mismatch \u53c2\u6570\u8bbe\u7f6e\u4e3a\u975e\u96f6\u503c\uff0c\u53ef\u80fd\u589e\u52a0\u547d\u4e2d\u6b21\u6570\uff0c\u4ece\u800c\u5f71\u54cd\u6700\u7ec8\u8ba1\u6570\u7ed3\u679c\u3002\u56e0\u6b64\uff0c\u82e5\u5b9e\u9a8c\u8bbe\u8ba1\u8981\u6c42\u7cbe\u786e\u5339\u914d\uff0c\u5e94\u5c06 max.mismatch \u8bbe\u7f6e\u4e3a 0\uff0c\u4ee5\u907f\u514d\u56e0\u9519\u914d\u5bfc\u81f4\u7684\u8ba1\u6570\u504f\u5dee\u3002\u901a\u8fc7\u8c03\u6574\u53c2\u6570\uff0c\u53ef\u9a8c\u8bc1\u4e3b\u7ed3\u8bba\u7684\u7a33\u5065\u6027\uff0c\u786e\u4fdd\u7ed3\u679c\u7b26\u5408\u5b9e\u9a8c\u8bbe\u8ba1\u8981\u6c42\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\">\u5728\u6d4b\u8bd5\u5e8f\u5217\u4e2d\u5148\u5d4c\u5165\u4e00\u4e2a\u660e\u786e\u7684\u6b63\u5411\u547d\u4e2d\uff0c\u518d\u52a0\u5165\u4e00\u4e2a\u4ec5\u53cd\u5411\u4e92\u8865\u53ef\u5339\u914d\u7684\u4f4d\u7f6e\u4ee5\u53ca\u4e00\u4e2a\u56de\u6587\u63a2\u9488\u3002\u7ed9\u6bcf\u4e2a\u7269\u7406\u4f4d\u7f6e\u767b\u8bb0\u8d77\u6b62\u3001\u94fe\u548c\u63a2\u9488\u540d\u79f0\u3002\u6309\u94fe\u6c47\u603b\u4e0e\u6309\u552f\u4e00\u4f4d\u7f6e\u6c47\u603b\u662f\u4e24\u79cd\u8ba1\u6570\uff0c\u56de\u6587\u5e8f\u5217\u7279\u522b\u5bb9\u6613\u5728\u5408\u5e76\u4e24\u6761\u94fe\u65f6\u7b97\u4e24\u904d\u3002\u9047\u5230\u6a21\u7cca\u78b1\u57fa\uff0c\u8fd8\u8981\u8bf4\u660e\u600e\u6837\u89e3\u91ca\u6a21\u7cca\u7801\u3001\u5141\u8bb8\u51e0\u4e2a\u9519\u914d\uff0c\u4ee5\u53ca\u76f8\u4e92\u91cd\u53e0\u7684\u547d\u4e2d\u662f\u5426\u5404\u81ea\u8ba1\u5165\u3002<\/p>\n<p style=\"margin:.5em 0 1em\">\u628a\u5019\u9009\u533a\u57df\u7684\u539f\u59cb\u6807\u8bc6\u3001\u53c2\u8003\u7248\u672c\u3001\u8d77\u70b9\u548c\u7ec8\u70b9\u5199\u5728\u540c\u4e00\u884c\uff0c\u518d\u4ece\u4e00\u4e2a\u5177\u4f53\u5bf9\u8c61\u53cd\u67e5\u5b83\u5982\u4f55\u843d\u8fdb\u8be5\u533a\u57df\u3002\u82e5\u9700\u8981\u8f6c\u6362\u540d\u79f0\u6216\u5750\u6807\uff0c\u4fdd\u7559\u8f6c\u6362\u524d\u540e\u4e24\u4e2a\u503c\u4ee5\u53ca\u65e0\u6cd5\u5339\u914d\u7684\u6761\u76ee\u3002\u591a\u4e2a\u5bf9\u8c61\u5408\u5728\u4e00\u8d77\u4ee5\u540e\uff0c\u540d\u5b57\u76f8\u540c\u4e0d\u4ee3\u8868\u6765\u81ea\u540c\u4e00\u6ce8\u91ca\u7248\u672c\u3002\u6700\u7701\u4e8b\u7684\u9a8c\u7b97\u662f\u540c\u65f6\u67e5\u4e00\u6761\u660e\u786e\u5e94\u5f53\u547d\u4e2d\u7684\u8bb0\u5f55\u548c\u4e00\u6761\u6070\u5728\u8fb9\u754c\u5916\u7684\u8bb0\u5f55\uff0c\u540e\u8005\u80fd\u53d1\u73b0\u5355\u9760\u9633\u6027\u4f8b\u5b50\u770b\u4e0d\u51fa\u7684\u7aef\u70b9\u9519\u8bef\u3002<\/p>\n<p style=\"margin:.5em 0 1em\">\u5bf9\u4e8e\u7ed3\u679c\u8868\u7684\u4e00\u884c\uff0c\u518d\u95ee\u5b83\u80fd\u4e0d\u80fd\u56de\u5230\u539f\u59cb\u8bb0\u5f55\u3002\u82e5\u4e00\u884c\u4ee3\u8868\u805a\u5408\u540e\u7684\u533a\u57df\uff0c\u8981\u8ba9\u8bfb\u8005\u67e5\u5f97\u5230\u6709\u54ea\u4e9b\u6210\u5458\u88ab\u5408\u5e76\uff0c\u91cd\u590d\u6620\u5c04\u7684\u6210\u5458\u6309\u4ec0\u4e48\u89c4\u5219\u8ba1\u7b97\u3002\u82e5\u6362\u7528\u53e6\u4e00\u4e2a\u6ce8\u91ca\u7248\u672c\uff0c\u5148\u5217\u51fa\u6d88\u5931\u3001\u65b0\u589e\u548c\u8eab\u4efd\u53ef\u5bf9\u5e94\u7684\u533a\u57df\uff0c\u533a\u57df\u8eab\u4efd\u4e0d\u540c\u7684\u884c\u4e0d\u8981\u53ea\u6309\u6392\u5e8f\u53f7\u6a2a\u5411\u62fc\u5728\u4e00\u8d77\u3002\u8fd9\u6837\u5373\u4f7f\u6700\u7ec8\u6570\u5b57\u4e0d\u540c\uff0c\u4e5f\u80fd\u786e\u5b9a\u662f\u5019\u9009\u8303\u56f4\u53d8\u4e86\uff0c\u8fd8\u662f\u540c\u4e00\u8303\u56f4\u5185\u7684\u6d4b\u91cf\u786e\u5b9e\u4e0d\u540c\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\/056-biostrings-code-bf4959a680cb8770.zip\">\u4e0b\u8f7d\u672c\u7bc7 R \u4ee3\u7801\uff08ZIP\uff0c4.1 KiB\uff09<\/a> \u00b7 <a style=\"color:#1458a5;text-decoration:underline;\" href=\"https:\/\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/r-practice-labs\/056-biostrings-data-59c49bb42359b942.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;\">056-biostrings<\/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\u63a2\u9488\u5b57\u5178\u5b9e\u9645\u8ba1\u6570\u56de\u6587\u5e8f\u5217\u201d\u3002Linux x86_64\u3001R 4.3.3\u3001Biostrings 2.64.1 \u7684\u8f93\u51fa\u4e3a\u6b63\u5411\u547d\u4e2d 2\uff0c\u53cd\u5411\u4e92\u8865\u547d\u4e2d 2\uff0c\u5e8f\u5217\u76f8\u7b49 1\u3002<\/p>\n<p style=\"margin:.5em 0 1em\">\u5148\u628a\u67e5\u8be2\u8bcd\u4e0e\u5b83\u7684\u53cd\u5411\u4e92\u8865\u5e8f\u5217\u5e76\u6392\u6253\u5370\u3002\u82e5\u4e24\u4e32\u76f8\u540c\uff0c\u4e24\u6b21\u641c\u7d22\u547d\u4e2d\u7684\u5176\u5b9e\u662f\u540c\u4e00\u7ec4\u4f4d\u7f6e\u3002\u53ea\u8981\u9700\u8981\u62a5\u544a\u552f\u4e00\u4f4d\u7f6e\uff0c\u5c31\u5e94\u5728\u5e8f\u5217\u5750\u6807\u4e0a\u53bb\u91cd\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\">\u540c\u4e00\u56de\u6587\u63a2\u9488\u5728\u6b63\u5411\u548c\u53cd\u5411\u4e92\u8865\u4e24\u6b21\u641c\u7d22\u4e2d\u90fd\u5f97\u5230\u4e86\u4e24\u4e2a\u547d\u4e2d\uff0c\u56de\u770b\u5e8f\u5217\u53d1\u73b0\u5176\u5b9e\u662f\u76f8\u540c\u7684\u4e24\u4e2a\u4f4d\u7f6e\u3002\u8bbe\u8ba1\u63a2\u9488\u53ea\u5173\u5fc3\u6709\u591a\u5c11\u4e0d\u540c\u57fa\u56e0\u7ec4\u4f4d\u70b9\u65f6\u5e94\u5408\u5e76\u4f4d\u7f6e\uff0c\u540c\u65f6\u4fdd\u7559\u65b9\u5411\u4fe1\u606f\u3002\u53cc\u94fe\u5b9e\u9a8c\u82e5\u6309\u65b9\u5411\u7edf\u8ba1\uff0c\u4e5f\u8981\u5728\u8f93\u51fa\u91cc\u660e\u786e\u8fd9\u4e00\u53e3\u5f84\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>\u4e8c\u78b1\u57fa\u63a2\u9488 AT \u7684\u53cd\u5411\u4e92\u8865\u4ecd\u662f AT\uff0c\u5728 ATAT \u7684\u8d77\u70b9\u4e00\u548c\u4e09\u547d\u4e2d\uff1b\u6309\u65e0\u65b9\u5411\u4f4d\u70b9\u8ba1\u4e3a\u4e8c\uff0c\u6309\u4e24\u65b9\u5411\u7d2f\u52a0\u4e3a\u56db\u3002<\/p>\n","protected":false},"author":1,"featured_media":68712,"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":[778,728,772],"class_list":["post-68713","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-r","category-part","tag-biostrings","tag-r","tag-772"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2026\/11\/r-guide-biostrings-practice-514cd3de.png?fit=1120%2C690&ssl=1","_links":{"self":[{"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/posts\/68713","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=68713"}],"version-history":[{"count":3,"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/posts\/68713\/revisions"}],"predecessor-version":[{"id":70922,"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/posts\/68713\/revisions\/70922"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/media\/68712"}],"wp:attachment":[{"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/media?parent=68713"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/categories?post=68713"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/tags?post=68713"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}