{"id":248,"date":"2017-04-02T16:12:00","date_gmt":"2017-04-02T08:12:00","guid":{"rendered":"https:\/\/www.next-bioinfo.tw\/?p=248"},"modified":"2025-01-05T23:43:21","modified_gmt":"2025-01-05T15:43:21","slug":"%e3%80%90ngs-%e6%ac%a1%e4%b8%96%e4%bb%a3%e5%9f%ba%e5%9b%a0%e9%ab%94%e8%b3%87%e6%96%99%e7%a7%91%e5%ad%b8%e3%80%91%e5%9f%ba%e7%a4%8e%e6%95%99%e5%ad%b8-05-burrows-wheeler-aligner-bwa-%e7%9a%84%e4%bd%bf","status":"publish","type":"post","link":"https:\/\/www.next-bioinfo.tw\/en\/2017\/04\/%e3%80%90ngs-%e6%ac%a1%e4%b8%96%e4%bb%a3%e5%9f%ba%e5%9b%a0%e9%ab%94%e8%b3%87%e6%96%99%e7%a7%91%e5%ad%b8%e3%80%91%e5%9f%ba%e7%a4%8e%e6%95%99%e5%ad%b8-05-burrows-wheeler-aligner-bwa-%e7%9a%84%e4%bd%bf\/","title":{"rendered":"\u3010NGS \u6b21\u4e16\u4ee3\u57fa\u56e0\u9ad4\u8cc7\u6599\u79d1\u5b78\u3011\u57fa\u790e\u6559\u5b78 05 Burrows-Wheeler Aligner BWA \u7684\u4f7f\u7528\u4ecb\u7d39"},"content":{"rendered":"<p>BWA (Burrows-Wheeler Aligner) \u662f\u5e38\u898b\u7684\u57fa\u56e0\u9ad4\u5e8f\u5217\u6bd4\u5c0d\u7a0b\u5f0f\uff0c\u95dc\u65bcDNA\u5e8f\u5217\u7684\u7814\u7a76\u6703\u4f7f\u7528\u5b83\u4f86\u628a\u5b9a\u5e8f\u56de\u4f86\u7684\u539f\u59cb\u8cc7\u6599(FASTQ)\u6bd4\u5c0d\u56de\u53c3\u8003\u57fa\u56e0\u7d44\u4e0a\uff0c\u5176\u4e2d\u985e\u4f3c\u7684\u6bd4\u5c0d\u8edf\u9ad4\u9084\u6709Bowtie\uff0cBowtie2\uff0cSOAPaligner\u7b49\uff0c\u5546\u696d\u65b9\u6848\u5247\u66f4\u591a\u6703\u8003\u616e\u7528illumina \u7684 DRAGEN Bio-IT Platform\u3002\u9019\u88e1\u5c31\u4ecb\u7d39\u600e\u9ebc\u7528BWA\u4f86\u505a\u6bd4\u5c0d\uff0c\u5b83\u662f\u505a\u7814\u7a76\u6bd4\u8f03\u5e38\u7528\u7684\u6bd4\u5c0d\u8edf\u9ad4\u3002<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_54_1 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" >Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\" role=\"button\"><label for=\"item-6a6d40dda9a9d\" ><span class=\"\"><span style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewbox=\"0 0 24 24\" version=\"1.2\" baseprofile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input aria-label=\"Toggle\" type=\"checkbox\"  id=\"item-6a6d40dda9a9d\"><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1' ><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.next-bioinfo.tw\/en\/2017\/04\/%e3%80%90ngs-%e6%ac%a1%e4%b8%96%e4%bb%a3%e5%9f%ba%e5%9b%a0%e9%ab%94%e8%b3%87%e6%96%99%e7%a7%91%e5%ad%b8%e3%80%91%e5%9f%ba%e7%a4%8e%e6%95%99%e5%ad%b8-05-burrows-wheeler-aligner-bwa-%e7%9a%84%e4%bd%bf\/#BWA%E7%9A%84%E7%B7%A8%E8%AD%AF%E5%92%8C%E5%AE%89%E8%A3%9D\" title=\"BWA\u7684\u7de8\u8b6f\u548c\u5b89\u88dd\">BWA\u7684\u7de8\u8b6f\u548c\u5b89\u88dd<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.next-bioinfo.tw\/en\/2017\/04\/%e3%80%90ngs-%e6%ac%a1%e4%b8%96%e4%bb%a3%e5%9f%ba%e5%9b%a0%e9%ab%94%e8%b3%87%e6%96%99%e7%a7%91%e5%ad%b8%e3%80%91%e5%9f%ba%e7%a4%8e%e6%95%99%e5%ad%b8-05-burrows-wheeler-aligner-bwa-%e7%9a%84%e4%bd%bf\/#BWA%E5%BB%BA%E7%AB%8B%E5%8F%83%E8%80%83%E5%9F%BA%E5%9B%A0%E7%B5%84%E7%9A%84%E7%B4%A2%E5%BC%95\" title=\"BWA\u5efa\u7acb\u53c3\u8003\u57fa\u56e0\u7d44\u7684\u7d22\u5f15\">BWA\u5efa\u7acb\u53c3\u8003\u57fa\u56e0\u7d44\u7684\u7d22\u5f15<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.next-bioinfo.tw\/en\/2017\/04\/%e3%80%90ngs-%e6%ac%a1%e4%b8%96%e4%bb%a3%e5%9f%ba%e5%9b%a0%e9%ab%94%e8%b3%87%e6%96%99%e7%a7%91%e5%ad%b8%e3%80%91%e5%9f%ba%e7%a4%8e%e6%95%99%e5%ad%b8-05-burrows-wheeler-aligner-bwa-%e7%9a%84%e4%bd%bf\/#%E5%88%A9%E7%94%A8BWA_%E9%80%B2%E8%A1%8C%E6%AF%94%E5%B0%8DNGS%E8%B3%87%E6%96%99\" title=\"\u5229\u7528BWA \u9032\u884c\u6bd4\u5c0dNGS\u8cc7\u6599\">\u5229\u7528BWA \u9032\u884c\u6bd4\u5c0dNGS\u8cc7\u6599<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.next-bioinfo.tw\/en\/2017\/04\/%e3%80%90ngs-%e6%ac%a1%e4%b8%96%e4%bb%a3%e5%9f%ba%e5%9b%a0%e9%ab%94%e8%b3%87%e6%96%99%e7%a7%91%e5%ad%b8%e3%80%91%e5%9f%ba%e7%a4%8e%e6%95%99%e5%ad%b8-05-burrows-wheeler-aligner-bwa-%e7%9a%84%e4%bd%bf\/#%E5%B0%88%E6%A1%88%E7%B6%B2%E5%9D%80\" title=\"\u5c08\u6848\u7db2\u5740\">\u5c08\u6848\u7db2\u5740<\/a><\/li><\/ul><\/nav><\/div>\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"BWA%E7%9A%84%E7%B7%A8%E8%AD%AF%E5%92%8C%E5%AE%89%E8%A3%9D\"><\/span>BWA\u7684\u7de8\u8b6f\u548c\u5b89\u88dd<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>\u9019\u908a\u53ef\u4ee5\u76f4\u63a5\u53c3\u8003\u5b98\u65b9\u7684\u5b89\u88dd\u6307\u4ee4\uff08\u9700\u6709make\uff09\uff1a<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" data-code=\"git clone https:\/\/github.com\/lh3\/bwa.gitcd bwa; make\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #88C0D0\">git<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">clone<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">https:\/\/github.com\/lh3\/bwa.git<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">cd<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">bwa<\/span><span style=\"color: #81A1C1\">;<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #88C0D0\">make<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\u4e0d\u904e\u7531\u65bc\u63a1\u7528\u76840.7.17\u7248\u672c\u8ddf\u6211\u7684GCC\u7de8\u8b6f\u5668\u7248\u672c\u6703\u6709\u885d\u7a81\uff0c\u6211\u9019\u908a\u6309\u7167<a href=\"https:\/\/github.com\/lh3\/bwa\/commit\/2a1ae7b6f34a96ea25be007ac9d91e57e9d32284\">\u9019\u88e1<\/a>\u7684\u6307\u793a\u53bb\u4fee\u6539rle.h\u7684\u7a0b\u5f0f\u78bc\uff0c\u4e26\u91cd\u65b0\u6574\u7406\u6210shell script \u5982\u4e0b\uff1a<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#d8dee9ff;--cbp-line-number-width:16.854167938232422px;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#39404f;color:#c8d0e0\">ShellScript<\/span><span role=\"button\" tabindex=\"0\" data-code=\"#!\/bin\/bash# download &amp; compile bwawget https:\/\/github.com\/lh3\/bwa\/archive\/refs\/tags\/v0.7.17.tar.gztar -xzf v0.7.17.tar.gzcd bwa-0.7.17sed -i 's\/const\\suint8_t\\srle_auxtab\/extern const uint8_t rle_auxtab\/g' rle.h# bug fix see also#https:\/\/github.com\/lh3\/bwa\/commit\/2a1ae7b6f34a96ea25be007ac9d91e57e9d32284make mv bwa ..\/cd ..\/rm -r bwa-0.7.17rm v0.7.17.tar.gz.\/bwa\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #616E88\">#!\/bin\/bash<\/span><\/span>\n<span class=\"line\"><span style=\"color: #616E88\"># download &amp; compile bwa<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">wget<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">https:\/\/github.com\/lh3\/bwa\/archive\/refs\/tags\/v0.7.17.tar.gz<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">tar<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">-xzf<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">v0.7.17.tar.gz<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">cd<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">bwa-0.7.17<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">sed<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">-i<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">s\/const\\suint8_t\\srle_auxtab\/extern const uint8_t rle_auxtab\/g<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">rle.h<\/span><\/span>\n<span class=\"line\"><span style=\"color: #616E88\"># bug fix see also<\/span><\/span>\n<span class=\"line\"><span style=\"color: #616E88\">#https:\/\/github.com\/lh3\/bwa\/commit\/2a1ae7b6f34a96ea25be007ac9d91e57e9d32284<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">make<\/span><span style=\"color: #D8DEE9FF\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">mv<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">bwa<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">..\/<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">cd<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">..\/<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">rm<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">-r<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">bwa-0.7.17<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">rm<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">v0.7.17.tar.gz<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">.\/bwa<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\u57f7\u884c\u4e4b\u5f8c\u5982\u679c\u6210\u529f\u7de8\u8b6f\u5b8c\u6210\u6703\u986f\u793a\uff1a<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" data-code=\"Program: bwa (alignment via Burrows-Wheeler transformation)Version: 0.7.17-r1188Contact: Heng Li &lt;lh3@sanger.ac.uk&gt;Usage:   bwa &lt;command&gt; [options]Command: index         index sequences in the FASTA format        mem           BWA-MEM algorithm        fastmap       identify super-maximal exact matches        pemerge       merge overlapping paired ends (EXPERIMENTAL)        aln           gapped\/ungapped alignment        samse         generate alignment (single ended)        sampe         generate alignment (paired ended)        bwasw         BWA-SW for long queries        shm           manage indices in shared memory        fa2pac        convert FASTA to PAC format        pac2bwt       generate BWT from PAC        pac2bwtgen    alternative algorithm for generating BWT\u9019\u88e1\u5c31\u4ecb\u7d39\u600e\u9ebc\u7528BWA\u4f86\u505a\u6bd4\u5c0d\uff0c        bwtupdate     update .bwt to the new format        bwt2sa        generate SA from BWT and OccNote: To use BWA, you need to first index the genome with `bwa index'.     There are three alignment algorithms in BWA: `mem', `bwasw', and     `aln\/samse\/sampe'. If you are not sure which to use, try `bwa mem'     first. Please `man .\/bwa.1' for the manual.\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #88C0D0\">Program:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">bwa<\/span><span style=\"color: #D8DEE9FF\"> (alignment <\/span><span style=\"color: #A3BE8C\">via<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">Burrows-Wheeler<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">transformation<\/span><span style=\"color: #D8DEE9FF\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">Version:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #B48EAD\">0.7<\/span><span style=\"color: #A3BE8C\">.17-r1188<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">Contact:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">Heng<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">Li<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">&lt;<\/span><span style=\"color: #A3BE8C\">lh3@sanger.ac.u<\/span><span style=\"color: #D8DEE9FF\">k<\/span><span style=\"color: #81A1C1\">&gt;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">Usage:<\/span><span style=\"color: #D8DEE9FF\">   <\/span><span style=\"color: #A3BE8C\">bwa<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">&lt;<\/span><span style=\"color: #A3BE8C\">comman<\/span><span style=\"color: #D8DEE9FF\">d<\/span><span style=\"color: #81A1C1\">&gt;<\/span><span style=\"color: #D8DEE9FF\"> [options]<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">Command:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">index<\/span><span style=\"color: #D8DEE9FF\">         <\/span><span style=\"color: #A3BE8C\">index<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">sequences<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">in<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">the<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">FASTA<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">format<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">        <\/span><span style=\"color: #88C0D0\">mem<\/span><span style=\"color: #D8DEE9FF\">           <\/span><span style=\"color: #A3BE8C\">BWA-MEM<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">algorithm<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">        <\/span><span style=\"color: #88C0D0\">fastmap<\/span><span style=\"color: #D8DEE9FF\">       <\/span><span style=\"color: #A3BE8C\">identify<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">super-maximal<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">exact<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">matches<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">        <\/span><span style=\"color: #88C0D0\">pemerge<\/span><span style=\"color: #D8DEE9FF\">       <\/span><span style=\"color: #A3BE8C\">merge<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">overlapping<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">paired<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">ends<\/span><span style=\"color: #D8DEE9FF\"> (EXPERIMENTAL)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">        <\/span><span style=\"color: #88C0D0\">aln<\/span><span style=\"color: #D8DEE9FF\">           <\/span><span style=\"color: #A3BE8C\">gapped\/ungapped<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">alignment<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">        <\/span><span style=\"color: #88C0D0\">samse<\/span><span style=\"color: #D8DEE9FF\">         <\/span><span style=\"color: #A3BE8C\">generate<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">alignment<\/span><span style=\"color: #D8DEE9FF\"> (single <\/span><span style=\"color: #A3BE8C\">ended<\/span><span style=\"color: #D8DEE9FF\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">        <\/span><span style=\"color: #88C0D0\">sampe<\/span><span style=\"color: #D8DEE9FF\">         <\/span><span style=\"color: #A3BE8C\">generate<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">alignment<\/span><span style=\"color: #D8DEE9FF\"> (paired <\/span><span style=\"color: #A3BE8C\">ended<\/span><span style=\"color: #D8DEE9FF\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">        <\/span><span style=\"color: #88C0D0\">bwasw<\/span><span style=\"color: #D8DEE9FF\">         <\/span><span style=\"color: #A3BE8C\">BWA-SW<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">for<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">long<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">queries<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">        <\/span><span style=\"color: #88C0D0\">shm<\/span><span style=\"color: #D8DEE9FF\">           <\/span><span style=\"color: #A3BE8C\">manage<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">indices<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">in<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">shared<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">memory<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">        <\/span><span style=\"color: #88C0D0\">fa2pac<\/span><span style=\"color: #D8DEE9FF\">        <\/span><span style=\"color: #A3BE8C\">convert<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">FASTA<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">to<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">PAC<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">format<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">        <\/span><span style=\"color: #88C0D0\">pac2bwt<\/span><span style=\"color: #D8DEE9FF\">       <\/span><span style=\"color: #A3BE8C\">generate<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">BWT<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">from<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">PAC<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">        <\/span><span style=\"color: #88C0D0\">pac2bwtgen<\/span><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #A3BE8C\">alternative<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">algorithm<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">for<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">generating<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">BWT\u9019\u88e1\u5c31\u4ecb\u7d39\u600e\u9ebc\u7528BWA\u4f86\u505a\u6bd4\u5c0d\uff0c<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">        <\/span><span style=\"color: #88C0D0\">bwtupdate<\/span><span style=\"color: #D8DEE9FF\">     <\/span><span style=\"color: #A3BE8C\">update<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">.bwt<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">to<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">the<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">new<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">format<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">        <\/span><span style=\"color: #88C0D0\">bwt2sa<\/span><span style=\"color: #D8DEE9FF\">        <\/span><span style=\"color: #A3BE8C\">generate<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">SA<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">from<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">BWT<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">and<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">Occ<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">Note:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">To<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">use<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">BWA,<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">you<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">need<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">to<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">first<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">index<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">the<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">genome<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">with<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">`<\/span><span style=\"color: #88C0D0\">bwa<\/span><span style=\"color: #A3BE8C\"> index<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">.<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A3BE8C\">     There are three alignment algorithms in BWA: `mem<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">, <\/span><span style=\"color: #ECEFF4\">`<\/span><span style=\"color: #88C0D0\">bwasw<\/span><span style=\"color: #88C0D0\">&#39;, and<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">     `aln\/samse\/sampe&#39;<\/span><span style=\"color: #88C0D0\">.<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">If<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">you<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">are<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">not<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">sure<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">which<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">to<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">use,<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">try<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">`<\/span><span style=\"color: #88C0D0\">bwa<\/span><span style=\"color: #A3BE8C\"> mem<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A3BE8C\">     first. Please `man .\/bwa.1<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\"> for the manual.<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"BWA%E5%BB%BA%E7%AB%8B%E5%8F%83%E8%80%83%E5%9F%BA%E5%9B%A0%E7%B5%84%E7%9A%84%E7%B4%A2%E5%BC%95\"><\/span>BWA\u5efa\u7acb\u53c3\u8003\u57fa\u56e0\u7d44\u7684\u7d22\u5f15<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>\u5e38\u898b\u5df2\u7d44\u88dd\u597d\u7684\u53c3\u8003\u57fa\u56e0\u7d44\uff0c\u4f8b\u5982hg19\uff0cmm10\u53ef\u4ee5\u5f9eUCSC \u57fa\u56e0\u7d44\u7db2\u7ad9<a href=\"https:\/\/hgdownload.soe.ucsc.edu\/downloads.html\">https:\/\/hgdownload.soe.ucsc.edu\/downloads.html<\/a> \u4e0b\u8f09\uff0c\u89e3\u58d3\u7e2e\u5408\u4f75\u4e4b\u5f8c\u5c31\u53ef\u4ee5\u7528bwa index \u9019\u500b\u6307\u4ee4\u53bb\u7522\u751fBWA\u5c08\u7528\u7684\u7d22\u5f15\u6a94\uff0c\u5f8c\u7e8c\u9664\u975e\u4f7f\u7528\u5176\u4ed6\u7248\u672c\u7684\u53c3\u8003\u57fa\u56e0\u7d44\uff0c\u5426\u5247\u539f\u5247\u4e0a\u9019\u500b\u6b65\u9a5f\u53ea\u9700\u8981\u505a\u5b8c\u4e00\u6b21\u5373\u53ef\u3002\u9019\u88e1\u793a\u7bc4\u5efa\u7acbucsc hg19\u7d22\u5f15\u7684shel script\uff1a<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#d8dee9ff;--cbp-line-number-width:16.854167938232422px;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#39404f;color:#c8d0e0\">ShellScript<\/span><span role=\"button\" tabindex=\"0\" data-code=\"#!\/bin\/bash# download ucsc hg19mkdir bwa_hg19cd bwa_hg19wget http:\/\/hgdownload.cse.ucsc.edu\/goldenPath\/hg19\/bigZips\/chromFa.tar.gztar zvfx chromFa.tar.gzcat *.fa &gt; hg19.farm chr*.fa..\/bwa index -p hg19_bwa_idx -a bwtsw hg19.fa\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #616E88\">#!\/bin\/bash<\/span><\/span>\n<span class=\"line\"><span style=\"color: #616E88\"># download ucsc hg19<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">mkdir<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">bwa_hg19<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">cd<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">bwa_hg19<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">wget<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">http:\/\/hgdownload.cse.ucsc.edu\/goldenPath\/hg19\/bigZips\/chromFa.tar.gz<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">tar<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">zvfx<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">chromFa.tar.gz<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">cat<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">*<\/span><span style=\"color: #A3BE8C\">.fa<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">&gt;<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">hg19.fa<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">rm<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">chr<\/span><span style=\"color: #81A1C1\">*<\/span><span style=\"color: #A3BE8C\">.fa<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">.<\/span><span style=\"color: #D8DEE9FF\">.\/bwa <\/span><span style=\"color: #A3BE8C\">index<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">-p<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">hg19_bwa_idx<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">-a<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">bwtsw<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">hg19.fa<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\u9664\u4e86UCSU\u7684\u7248\u672c\u4e4b\u5916\uff0c\u53ef\u4ee5\u4e0b\u8f09\u53c3\u8003\u57fa\u56e0\u7d44\u7684\u5730\u65b9\u9084\u6709NCBI\uff0cENSEMBL\u4ee5\u53caGencode\u3002\u5982\u679c\u4e0d\u662f\u5df2\u7d93\u6709\u53c3\u8003\u57fa\u56e0\u7d44\u7684\u7269\u7a2e\uff0c\u5c31\u9700\u8981\u9032\u884c\u5f9e\u982d\u7d44\u88dd(De novo assembly)<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E5%88%A9%E7%94%A8BWA_%E9%80%B2%E8%A1%8C%E6%AF%94%E5%B0%8DNGS%E8%B3%87%E6%96%99\"><\/span>\u5229\u7528BWA \u9032\u884c\u6bd4\u5c0dNGS\u8cc7\u6599<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>\u4e00\u822c\u800c\u8a00\uff0c\u4e0b\u6a5f\u5f8c\u62ff\u5230\u7684\u5c31\u662fFASTQ\u683c\u5f0f\u7684\u8cc7\u6599\uff0c\u6216\u662fpublished dataset \u7684raw data \u4e0b\u8f09\u56de\u4f86\uff0c\u7d93\u904eFastQC\u505a\u5b8cQC\u4e4b\u5f8c\uff0c\u5c31\u53ef\u9032\u884cMapping\u7684\u6d41\u7a0b\u3002\u9019\u88e1\u8003\u616e\u8655\u7406\u8cc7\u6599\u6240\u9700\u7684\u6642\u9593\uff0c\u4f7f\u7528\u4ee5\u4e0b\u8f03\u5c0f\u7684\u6e2c\u8cc7\uff0c\u7528git\u4e0b\u8f09\uff1a<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#d8dee9ff;--cbp-line-number-width:8.43402099609375px;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#39404f;color:#c8d0e0\">ShellScript<\/span><span role=\"button\" tabindex=\"0\" data-code=\"git clone https:\/\/github.com\/hartwigmedical\/testdata.git\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #88C0D0\">git<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">clone<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">https:\/\/github.com\/hartwigmedical\/testdata.git<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>BWA mapping\u4e4b\u5f8c\u7684\u8f38\u51fa\u662fSAM\uff08Sequence Alignment Map\uff09\u683c\u5f0f\uff0cBWA\u9810\u8a2d\u662f\u8f38\u51fa\u5230\u6a19\u6e96\u8f38\u51fa\u88dd\u7f6e\uff0c\u53ef\u4ee5\u76f4\u63a5\u7528Linux\u7684\u7ba1\u9053(pipline)\u628a\u8cc7\u6599\u8f49\u9001\u5230samtools \u900f\u904e\u6307\u4ee4view\u548csort\u5f97\u5230\u672a\u7d93\u8655\u7406\u58d3\u7e2e\u904e\u7684BAM\uff08Binary Alignment Map\uff09\u683c\u5f0f\u3002\u7531\u65bc\u9700\u8981samtools\u4f86\u505a\u58d3\u7e2e\u7684\u5de5\u4f5c\uff0c\u56e0\u6b64\u9084\u9700\u8981\u5b89\u88dd\u597dsamtools\uff1a<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" data-code=\"sudo apt-get updatesudo apt-get install samtools\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #88C0D0\">sudo<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">apt-get<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">update<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">sudo<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">apt-get<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">install<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">samtools<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\u5b89\u88dd\u597d\u4e4b\u5f8c\uff0c\u5c31\u53ef\u4ee5\u6309\u7167\u4e0a\u8ff0\u6d41\u7a0b\u64b0\u5beb\u6307\u4ee4\u8173\u672c\u3002\u4ee5\u4e0b\u662f\u6574\u7406\u597d\u7684fastq to bam\u7684shell script \u8173\u672c\u7bc4\u4f8b\uff1a<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#d8dee9ff;--cbp-line-number-width:16.854167938232422px;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#39404f;color:#c8d0e0\">ShellScript<\/span><span role=\"button\" tabindex=\"0\" data-code=\"#!\/bin\/bash# bwa with samtools fastq to bambwa_path=&quot;.&quot;ref_path=&quot;.\/bwa_hg19\/hg19_bwa_idx&quot;raw_fq_R1='.\/testdata\/100k_reads_hiseq\/TESTX\/TESTX_H7YRLADXX_S1_L001_R1_001.fastq.gz'raw_fq_R2='.\/testdata\/100k_reads_hiseq\/TESTX\/TESTX_H7YRLADXX_S1_L001_R2_001.fastq.gz'thread='16'mkdir .\/tmp$bwa_path\/bwa mem -t $thread $ref_path $raw_fq_R1 $raw_fq_R2 2&gt;mapping.log |   samtools view -@ $thread -q 30 -bS - |   samtools sort -@ $thread -T .\/tmp &gt;out.bamsamtools index out.bamsamtools flagstat out.bam &gt;mapping.statrm -r .\/tmp\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #616E88\">#!\/bin\/bash<\/span><\/span>\n<span class=\"line\"><span style=\"color: #616E88\"># bwa with samtools fastq to bam<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">bwa_path<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">.<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">ref_path<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">.\/bwa_hg19\/hg19_bwa_idx<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">raw_fq_R1<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">.\/testdata\/100k_reads_hiseq\/TESTX\/TESTX_H7YRLADXX_S1_L001_R1_001.fastq.gz<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">raw_fq_R2<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">.\/testdata\/100k_reads_hiseq\/TESTX\/TESTX_H7YRLADXX_S1_L001_R2_001.fastq.gz<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">thread<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">16<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">mkdir<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">.\/tmp<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">$bwa_path<\/span><span style=\"color: #D8DEE9FF\">\/bwa mem -t <\/span><span style=\"color: #D8DEE9\">$thread<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">$ref_path<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">$raw_fq_R1<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">$raw_fq_R2<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">2&gt;<\/span><span style=\"color: #D8DEE9FF\">mapping.log <\/span><span style=\"color: #81A1C1\">|<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">   <\/span><span style=\"color: #88C0D0\">samtools<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">view<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">-@<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">$thread<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">-q<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #B48EAD\">30<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">-bS<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">-<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">|<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">   <\/span><span style=\"color: #88C0D0\">samtools<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">sort<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">-@<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">$thread<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">-T<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">.\/tmp<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">&gt;<\/span><span style=\"color: #A3BE8C\">out.bam<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">samtools<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">index<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">out.bam<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">samtools<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">flagstat<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">out.bam<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">&gt;<\/span><span style=\"color: #A3BE8C\">mapping.stat<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">rm<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">-r<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">.\/tmp<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\u00a0\u9019\u4e00\u6b65\u4e00\u822c\u800c\u8a00\u9700\u8981\u4e00\u6bb5\u6642\u9593\u4f86\u8dd1\uff0c\u6839\u64daFASTQ\u7684\u5927\u5c0f\u8d8a\u5927\u9700\u8981\u8d8a\u4e45\uff0c\u5230\u9019\u4e00\u6b65\u9a5f\u8d70\u5b8c\u5f9eFASTQ\u5230Raw BAM\u7684\u6d41\u7a0b\uff0c\u5230\u9019\u908a\u5c31\u6703\u5f97\u5230\u539f\u59cb\u7684\u6bd4\u5c0d\u7d50\u679c\u5c31\u53ef\u4ee5\u9032\u884c\u4e0b\u4e00\u6b65\u5b9a\u91cf\u6216\u662f\u5b9a\u6027(\u8b8a\u7570)\u7684\u5206\u6790\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E5%B0%88%E6%A1%88%E7%B6%B2%E5%9D%80\"><\/span>\u5c08\u6848\u7db2\u5740<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<figure class=\"wp-block-embed is-type-rich is-provider-\u5d4c\u5165\u5167\u5bb9 wp-block-embed-\u5d4c\u5165\u5167\u5bb9\"><div class=\"wp-block-embed__wrapper\">\n<div class=\"github-embed github-embed-repository github-logo-mark\">    <p>        <a href=\"https:\/\/github.com\/whuang022ai\/NGS_Analysis\" target=\"_blank\">\t\t\t<strong>\t\t\t\t\t\t\t<\/strong>\t\t<\/a>\t\t<br>        <a href=\"https:\/\/github.com\/whuang022ai\/NGS_Analysis\" target=\"_blank\">https:\/\/github.com\/whuang022ai\/NGS_Analysis<\/a><br>        <a href=\"https:\/\/github.com\/whuang022ai\/NGS_Analysis\/network\" target=\"_blank\">0<\/a> forks.<br>        <a href=\"https:\/\/github.com\/whuang022ai\/NGS_Analysis\/stargazers\" target=\"_blank\">0<\/a> stars.<br>        <a href=\"https:\/\/github.com\/whuang022ai\/NGS_Analysis\/issues\" target=\"_blank\">0<\/a> open issues.<br>        <details open>            <summary>Recent commits:<\/summary>            <ul class=\"github_commits\">                                    <li class=\"github_commit\">                        <a href=\"https:\/\/github.com\/whuang022ai\/NGS_Analysis\/commit\/078c299d9139b63bb97d7199980af0651ab8920e\" target=\"_blank\">Update README.md<\/a>, GitHub                    <\/li>                                    <li class=\"github_commit\">                        <a href=\"https:\/\/github.com\/whuang022ai\/NGS_Analysis\/commit\/d8e7455f31017b290f3b10fdbee016f1cab2ee03\" target=\"_blank\">Update README.md<\/a>, GitHub                    <\/li>                                    <li class=\"github_commit\">                        <a href=\"https:\/\/github.com\/whuang022ai\/NGS_Analysis\/commit\/db61199006b092d2635518f47be4d2bebf4b05f5\" target=\"_blank\">Update README.md<\/a>, GitHub                    <\/li>                                    <li class=\"github_commit\">                        <a href=\"https:\/\/github.com\/whuang022ai\/NGS_Analysis\/commit\/7b0809674cf1b41028ea48943ef6285709cf5eff\" target=\"_blank\">add zip data<\/a>, whuang022ai                    <\/li>                                    <li class=\"github_commit\">                        <a href=\"https:\/\/github.com\/whuang022ai\/NGS_Analysis\/commit\/6d9e66f36e6d6e8ba9c6ba6746b32d57c6266367\" target=\"_blank\">add readme<\/a>, whuang022ai                    <\/li>                            <\/ul>        <\/details>    <\/p><\/div>\n<\/div><\/figure>","protected":false},"excerpt":{"rendered":"<p>BWA (Burrows-Wheeler Aligner) \u662f\u5e38\u898b\u7684\u57fa\u56e0\u9ad4\u5e8f\u5217\u6bd4\u5c0d\u7a0b\u5f0f\uff0c\u95dc\u65bcDNA\u5e8f\u5217\u7684\u7814\u7a76\u6703 [&hellip;]<\/p>","protected":false},"author":1,"featured_media":249,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"site-container-style":"default","site-container-layout":"default","site-sidebar-layout":"default","site-transparent-header":"default","disable-article-header":"default","disable-site-header":"default","disable-site-footer":"default","disable-content-area-spacing":"default","footnotes":""},"categories":[2],"tags":[18,4,19,3],"_links":{"self":[{"href":"https:\/\/www.next-bioinfo.tw\/en\/wp-json\/wp\/v2\/posts\/248"}],"collection":[{"href":"https:\/\/www.next-bioinfo.tw\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.next-bioinfo.tw\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.next-bioinfo.tw\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.next-bioinfo.tw\/en\/wp-json\/wp\/v2\/comments?post=248"}],"version-history":[{"count":3,"href":"https:\/\/www.next-bioinfo.tw\/en\/wp-json\/wp\/v2\/posts\/248\/revisions"}],"predecessor-version":[{"id":479,"href":"https:\/\/www.next-bioinfo.tw\/en\/wp-json\/wp\/v2\/posts\/248\/revisions\/479"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.next-bioinfo.tw\/en\/wp-json\/wp\/v2\/media\/249"}],"wp:attachment":[{"href":"https:\/\/www.next-bioinfo.tw\/en\/wp-json\/wp\/v2\/media?parent=248"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.next-bioinfo.tw\/en\/wp-json\/wp\/v2\/categories?post=248"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.next-bioinfo.tw\/en\/wp-json\/wp\/v2\/tags?post=248"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}