# 读段比对

读段比对是[生物信息学](https://www.edgepedia.org/zh/bioinformatics)中的一个步骤，它将短的DNA或RNA测序读段比对到参考基因组或转录组上，以确定每条读段的来源位置。其输出是一组比对结果，几乎总是以SAM格式或其压缩二进制形式BAM存储。

SAM中的每条比对记录包含11个必填字段，包括读段名称、标志、参考序列名称、位置、比对质量（MAPQ）以及描述匹配、插入、缺失、跳跃和剪切操作的CIGAR字符串。<sup>[1](https://samtools.github.io/hts-specs/SAMv1.pdf)</sup> 该规范区分了线性比对与嵌合比对——后者表示为一组线性比对，其中一条为代表比对，其余为补充比对——以及多重比对，其中一条比对为主比对，其余带有次要比对标志。<sup>[1](https://samtools.github.io/hts-specs/SAMv1.pdf)</sup>

| 关键事实 | 数值 |
|---|---|
| 输出格式 | 带坐标、CIGAR、标志和MAPQ的SAM/BAM<sup>[1](https://samtools.github.io/hts-specs/SAMv1.pdf)</sup> |
| BAM大小 | 每个输入碱基约1.0字节（112 Gbp对应116 GB）<sup>[2](https://doi.org/10.1093/bioinformatics/btp352)</sup> |
| 主流索引 | 基于伯罗斯-惠勒变换的FM索引；人类基因组索引磁盘占用约2.2 GB<sup>[3](https://doi.org/10.1186/gb-2009-10-3-r25)</sup> |
| MAPQ定义 | \( Q = -10 \log_{10}(1 - p_{\mathrm{cor}}) \)，即比对错误的Phred标度概率<sup>[4](https://med.stanford.edu/content/dam/sm/dbds/documents/biostats-workshop/annurev-genom-090413-025358-2.pdf)</sup> |
| 唯一比对率 | 最佳情况下85–95%的读段<sup>[5](https://cshprotocols.cshlp.org/content/2017/1/pdb.top093153.full)</sup> |
| BWT比对工具的速度提升 | BWA在相似精度下比MAQ快约10–20倍<sup>[6](https://academic.oup.com/bioinformatics/article-lookup/doi/10.1093/bioinformatics/btp324)</sup> |

## 工作原理

基因组规模的近似读段比对依赖于两个核心思想：过滤和索引。<sup>[4](https://med.stanford.edu/content/dam/sm/dbds/documents/biostats-workshop/annurev-genom-090413-025358-2.pdf)</sup> 鸽巢引理指出，一个被切成\( k+1 \)段（种子）且最多含有\( k \)个错误的读段，必定包含至少一段在真实匹配中无错误出现，因此精确的种子命中可以提名候选位置。q-gram引理给出了一个相关的下界：长度为\( n \)且含有\( k \)个错误的读段与其匹配至少共享\( t(n,k,q) = n - (k+1)q + 1 \)个完整的q-gram，这是q-gram计数过滤的基础。<sup>[4](https://med.stanford.edu/content/dam/sm/dbds/documents/biostats-workshop/annurev-genom-090413-025358-2.pdf)</sup>

随后对候选位置进行验证：无空位的情况通过错配计数验证，有空位的情况则通过Myers位并行编辑距离算法或Smith-Waterman比对验证。<sup>[4](https://med.stanford.edu/content/dam/sm/dbds/documents/biostats-workshop/annurev-genom-090413-025358-2.pdf)</sup> 大多数现代比对工具使用基于[伯罗斯-惠勒变换](https://www.edgepedia.org/zh/burrows-wheeler-transform)（BWT）构建的FM索引来索引参考序列，其内存占用远小于后缀数组，同时保持快速，被认为是当前的首选方法。<sup>[4](https://med.stanford.edu/content/dam/sm/dbds/documents/biostats-workshop/annurev-genom-090413-025358-2.pdf)</sup> BWA的后向搜索在\( O(m) \)时间内计算长度为\( m \)的字符串的精确命中数，与基因组大小无关，因为精确重复会折叠到一条前缀树路径上。<sup>[6](https://academic.oup.com/bioinformatics/article-lookup/doi/10.1093/bioinformatics/btp324)</sup>

每条比对获得一个MAPQ值：\( Q = -10 \log_{10}(1 - p_{\mathrm{cor}}) \)，其中\( p_{\mathrm{cor}} \)是最高得分比对将读段置于其真实来源位置的概率；\( Q = 30 \)表示比对错误概率为千分之一。<sup>[4](https://med.stanford.edu/content/dam/sm/dbds/documents/biostats-workshop/annurev-genom-090413-025358-2.pdf)</sup>

## 操作流程

GATK最佳实践所规范的典型DNA变异发现工作流程如下：（1）生成带读段组的uBAM，（2）用MarkIlluminaAdapters标记接头序列，（3）串联SamToFastq、BWA-MEM和MergeBamAlignment以生成坐标排序的BAM，然后（4）标记重复，（5）碱基质量分数重校准（BQSR）。<sup>[7](https://gatk.broadinstitute.org/hc/en-us/articles/360039568932--How-to-Map-and-clean-up-short-read-sequence-data-efficiently)</sup><sup> • </sup><sup>[8](https://data.smaht.org/docs/additional-resources/pipeline-docs/short-read_illumina_paired-end)</sup> GATK推荐BWA-MEM用于针对大型参考序列的70 bp至1 Mbp的高质量读段。<sup>[7](https://gatk.broadinstitute.org/hc/en-us/articles/360039568932--How-to-Map-and-clean-up-short-read-sequence-data-efficiently)</sup>

参数选择调节速度与灵敏度之间的权衡。Bowtie 2使用多种子比对，提取种子并通过FM索引进行无空位比对，主要调节参数为种子长度（-L）、种子间隔（-i）和每个种子的错配数（-N）；在端到端模式下，对于读段长度\( L \)，其默认最低得分为\( -0.6 + -0.6 \cdot L \)，在局部模式下为\( 20 + 8.0 \ln(L) \)。<sup>[9](https://github.com/BenLangmead/bowtie2/blob/master/MANUAL)</sup> BWA自身的种子策略允许32 bp种子中最多两个差异，比无种子比对快2.5倍，而在70 bp读段上仅将错误率从0.08%提高到0.11%。<sup>[6](https://academic.oup.com/bioinformatics/article-lookup/doi/10.1093/bioinformatics/btp324)</sup>

## 起源

MAQ的论文《利用比对质量分数比对短DNA测序读段并检测变异》（李恒、阮珏和理查德·德宾，《基因组研究》，2008年）建立了比对质量框架。<sup>[10](https://doi.org/10.1101/gr.078212.108)</sup> Bowtie由[本·朗米德](https://www.edgepedia.org/zh/ben-langmead)及其同事于2009年在《基因组生物学》上提出，在人类基因组上每CPU小时可比对超过2500万条读段，内存占用约1.3 GB。<sup>[3](https://doi.org/10.1186/gb-2009-10-3-r25)</sup> BWA由李恒和理查德·德宾（《生物信息学》，2009年）提出，应用了BWT后向搜索并容忍错配和空位，在相似精度下比MAQ快10–20倍。<sup>[6](https://academic.oup.com/bioinformatics/article-lookup/doi/10.1093/bioinformatics/btp324)</sup> SAM格式和SAMtools由李恒、鲍勃·汉德萨克及其同事于2009年在《生物信息学》上发表。<sup>[2](https://doi.org/10.1093/bioinformatics/btp352)</sup> 对于长读段，BWA-SW（李恒和德宾，《生物信息学》，2010年）能够处理含大量插入缺失的读段，虽比短读段比对工具慢，但远快于BLAST或BLAT。<sup>[11](https://doi.org/10.1093/bioinformatics/btp698)</sup><sup> • </sup><sup>[5](https://cshprotocols.cshlp.org/content/2017/1/pdb.top093153.full)</sup> 2013年对三类（参考哈希、读段哈希和FM索引）共14种比对工具的评估发现，FM索引比对工具在精度和召回率上可与最佳哈希表比对工具相媲美，而内存和运行时间远低，这解释了这一转变。<sup>[12](https://journals.plos.org/plosone/article/file?id=10.1371%2Fjournal.pone.0052403&type=printable)</sup>

## 变体

**Bowtie与Bowtie 2。** Bowtie 2（朗米德和萨尔茨伯格，《自然·方法》，2012年）支持有空位比对、局部比对和双端比对，对于长度超过约50 bp的读段通常比Bowtie 1更快、更灵敏，人类基因组内存占用约3.2 GB RAM，而Bowtie 1约为2.2 GB。<sup>[13](https://doi.org/10.1038/nmeth.1923)</sup><sup> • </sup><sup>[9](https://github.com/BenLangmead/bowtie2/blob/master/MANUAL)</sup>

**BWA-backtrack与BWA-MEM。** BWA-MEM（[李恒](https://www.edgepedia.org/zh/heng-li)，2013年）是推荐用于现代Illumina变异发现流程的变体。<sup>[14](https://doi.org/10.48550/arxiv.1303.3997)</sup><sup> • </sup><sup>[7](https://gatk.broadinstitute.org/hc/en-us/articles/360039568932--How-to-Map-and-clean-up-short-read-sequence-data-efficiently)</sup>

**剪接比对工具。** STAR（多宾及其同事，《生物信息学》，2012年）在同一基准测试中比对速度超过其他RNA-seq比对工具50倍以上。<sup>[15](https://doi.org/10.1093/bioinformatics/bts635)</sup> TopHat2（金及其同事，《基因组生物学》，2013年）能够比对含插入、缺失和基因融合的转录组。<sup>[16](https://doi.org/10.1186/gb-2013-14-4-r36)</sup> HISAT（金、朗米德和萨尔茨伯格，《自然·方法》，2015年）降低了内存需求<sup>[17](https://doi.org/10.1038/nmeth.3317)</sup>，HISAT2（金大焕及其同事，《[自然·生物技术](https://www.edgepedia.org/zh/nature-biotechnology)》，2019年）使用图FM索引比对DNA和RNA，该索引整合了超过1450万个变异和单倍型。<sup>[18](https://doi.org/10.1038/s41587-019-0201-4)</sup>

**长读段。** Minimap2（李恒，《生物信息学》，2018年）遵循种子-链-比对流程，将参考序列的最小化子（罗伯茨及其同事，2004年）索引在哈希表中而非FM索引中；在相当精度下比主流短读段比对工具快3–4倍，在BWA-MEM失败的牛津纳米孔约100 kb人类读段上，其运行速度比其他比对工具快70倍以上，峰值内存6.1 GB。<sup>[19](https://doi.org/10.1093/bioinformatics/bty191)</sup><sup> • </sup><sup>[20](https://doi.org/10.1093/bioinformatics/bth408)</sup> 其凹形两段仿射空位代价缓解了BWA-MEM将长插入缺失断裂为较短空位的倾向。<sup>[19](https://doi.org/10.1093/bioinformatics/bty191)</sup>

**泛基因组参考。** vg变异图工具包（埃里克·加里森及其同事，《自然·生物技术》，2018年）在参考序列本身中表示遗传变异。<sup>[21](https://doi.org/10.1038/nbt.4227)</sup> Giraffe（西伦及其同事，《科学》，2021年）将短读段比对到嵌入泛基因组的数千个基因组上，速度与现有工具比对到单一参考序列相当，使用图伯罗斯-惠勒变换（GBWT）索引（西伦及其同事，2019年）存储和查询单倍型；在所有条件下比VG-MAP快一个数量级以上，但完整的千人基因组单倍型索引需要约80 GB内存。<sup>[22](https://doi.org/10.1126/science.abg8871)</sup><sup> • </sup><sup>[23](https://doi.org/10.1093/bioinformatics/btz575)</sup>

## 应用

读段比对是变异检测、RNA-seq定量、结构变异基因分型和疫情基因组学的基础。最佳情况下85–95%的短读段可唯一比对；可比对性取决于多态性、数据质量、读段长度和重复序列，比对到Alu元件（人类基因组中约\( 10^6 \)个）的读段通常被丢弃。<sup>[5](https://cshprotocols.cshlp.org/content/2017/1/pdb.top093153.full)</sup> 参考序列的选择很重要：在一项五物种细菌研究中，将[粘质沙雷菌](https://www.edgepedia.org/zh/serratia-marcescens)（Serratia marcescens）读段比对到疫情相关参考序列UMH9，得到96.7%的比对读段率和97.7%的基因组覆盖度，而其他参考序列的对应中位数均低于89%。<sup>[24](https://journals.plos.org/ploscompbiol/article?id=10.1371%2Fjournal.pcbi.1008678)</sup> 对于结构变异，Giraffe使得在长读段研究中发现的变异能够在5202个经短读段测序的多样化人类基因组中进行基因分型。<sup>[22](https://doi.org/10.1126/science.abg8871)</sup>

## 局限与替代方案

**重复序列与多重比对。** 多重比对主要由重复序列引起，嵌合比对则由结构变异、基因融合、错误组装、RNA-seq或实验方案引起。<sup>[1](https://samtools.github.io/hts-specs/SAMv1.pdf)</sup> 当配对读段的一端来自基因组的非重复部分时，双端读段可以解析重复序列内部的另一端。<sup>[4](https://med.stanford.edu/content/dam/sm/dbds/documents/biostats-workshop/annurev-genom-090413-025358-2.pdf)</sup> 短于16个碱基的读段预期会偶然比对到人类基因组上。<sup>[5](https://cshprotocols.cshlp.org/content/2017/1/pdb.top093153.full)</sup>

**参考偏好。** 在杂合SNP位点携带非参考等位基因的读段比对效果较差或无法比对，使等位基因平衡偏离预期的1:1比例；SNP感知比对或个性化二倍体参考序列可以缓解这一问题。<sup>[4](https://med.stanford.edu/content/dam/sm/dbds/documents/biostats-workshop/annurev-genom-090413-025358-2.pdf)</sup> 比对到单一任意参考序列会引入系统性错误，影响SNP检测、重组率、\( d_{\mathrm{N}}/d_{\mathrm{S}} \)比值和系统发育推断。<sup>[24](https://journals.plos.org/ploscompbiol/article?id=10.1371%2Fjournal.pcbi.1008678)</sup> 结构变异模型也约束了工具：HISAT2整合了长达20 bp的插入和任意长度的缺失，因此不包含重复、倒位或拷贝数变异。<sup>[25](https://www.ovid.com/journals/bioinf/fulltext/10.1093/bioinformatics/btad320~efficient-short-read-mapping-to-a-pangenome-that-is)</sup>

**无比对替代方案。** 准比对（RapMap，阿维·斯里瓦斯塔瓦及其同事，2016年）产生片段比对信息（转录本、链、位置）而不计算碱基到碱基的比对，因此不适用于变异检测等任务；RapMap在精度上与Bowtie 2相当或更优，同时远快于STAR。<sup>[26](https://doi.org/10.1093/bioinformatics/btw277)</sup> 轻量级方法在模拟中与比对高度一致，但在实验RNA-seq数据上可能给出差异较大的丰度估计，因为它们不通过比对得分验证比对结果；Salmon中的选择性比对将minimap2的链式算法应用于精确匹配，并丢弃得分低于最佳得分0.65倍的比对。<sup>[27](https://link.springer.com/article/10.1186/s13059-020-02151-8)</sup>

**泛基因组速度。** 已发表的速度比较存在分歧：Giraffe的作者报告泛基因组比对与线性参考比对一样快<sup>[22](https://doi.org/10.1126/science.abg8871)</sup>，而后来的一项基准测试发现线性比对工具Minimap2比泛基因组工具（VG Giraffe、HISAT2、GED-MAP）快2–6倍，其中GED-MAP在250 bp样本上达到99%的最佳精度，而VG需要比其他工具多一个数量级的内存。<sup>[25](https://www.ovid.com/journals/bioinf/fulltext/10.1093/bioinformatics/btad320~efficient-short-read-mapping-to-a-pangenome-that-is)</sup>

## References

1. [Sequence Alignment/Map Format Specification (version 1.6)](https://samtools.github.io/hts-specs/SAMv1.pdf)
2. [Heng Li and colleagues (2009). The Sequence Alignment/Map format and SAMtools. Bioinformatics.](https://doi.org/10.1093/bioinformatics/btp352)
3. [Ben Langmead and colleagues (2009). Ultrafast and memory-efficient alignment of short DNA sequences to the human genome. Genome biology.](https://doi.org/10.1186/gb-2009-10-3-r25)
4. [Alignment of Next-Generation Sequencing Reads (Annual Review of Genomics and Human Genetics)](https://med.stanford.edu/content/dam/sm/dbds/documents/biostats-workshop/annurev-genom-090413-025358-2.pdf)
5. [Mapping Billions of Short Reads to a Reference Genome](https://cshprotocols.cshlp.org/content/2017/1/pdb.top093153.full)
6. [Fast and accurate short read alignment with Burrows–Wheeler transform (BWA)](https://academic.oup.com/bioinformatics/article-lookup/doi/10.1093/bioinformatics/btp324)
7. [(How to) Map and clean up short read sequence data efficiently – GATK](https://gatk.broadinstitute.org/hc/en-us/articles/360039568932--How-to-Map-and-clean-up-short-read-sequence-data-efficiently)
8. [Illumina (short-read) – SMaHT Data Portal pipeline documentation](https://data.smaht.org/docs/additional-resources/pipeline-docs/short-read_illumina_paired-end)
9. [Bowtie 2 manual](https://github.com/BenLangmead/bowtie2/blob/master/MANUAL)
10. [Heng Li, Jue Ruan, Richard Durbin (2008). Mapping short DNA sequencing reads and calling variants using mapping quality scores. Genome Research.](https://doi.org/10.1101/gr.078212.108)
11. [Heng Li, Richard Durbin (2010). Fast and accurate long-read alignment with Burrows–Wheeler transform. Bioinformatics.](https://doi.org/10.1093/bioinformatics/btp698)
12. [A Comprehensive Evaluation of Alignment Algorithms (RNA-seq)](https://journals.plos.org/plosone/article/file?id=10.1371%2Fjournal.pone.0052403&type=printable)
13. [Ben Langmead, Steven L Salzberg (2012). Fast gapped-read alignment with Bowtie 2. Nature Methods.](https://doi.org/10.1038/nmeth.1923)
14. [Li, Heng (2013). Aligning sequence reads, clone sequences and assembly contigs with BWA-MEM. DROPS (Schloss Dagstuhl – Leibniz Center for Informatics).](https://doi.org/10.48550/arxiv.1303.3997)
15. [Alexander Dobin and colleagues (2012). STAR: ultrafast universal RNA-seq aligner. Bioinformatics.](https://doi.org/10.1093/bioinformatics/bts635)
16. [Daehwan Kim and colleagues (2013). TopHat2: accurate alignment of transcriptomes in the presence of insertions, deletions and gene fusions. Genome biology.](https://doi.org/10.1186/gb-2013-14-4-r36)
17. [Daehwan Kim, Ben Langmead, Steven L Salzberg (2015). HISAT: a fast spliced aligner with low memory requirements. Nature Methods.](https://doi.org/10.1038/nmeth.3317)
18. [Daehwan Kim and colleagues (2019). Graph-based genome alignment and genotyping with HISAT2 and HISAT-genotype. Nature Biotechnology.](https://doi.org/10.1038/s41587-019-0201-4)
19. [Heng Li (2018). Minimap2: pairwise alignment for nucleotide sequences. Bioinformatics.](https://doi.org/10.1093/bioinformatics/bty191)
20. [Michael Roberts and colleagues (2004). Reducing storage requirements for biological sequence comparison. Bioinformatics.](https://doi.org/10.1093/bioinformatics/bth408)
21. [Erik Garrison and colleagues (2018). Variation graph toolkit improves read mapping by representing genetic variation in the reference. Nature Biotechnology.](https://doi.org/10.1038/nbt.4227)
22. [Jouni Sirén and colleagues (2021). Pangenomics enables genotyping of known structural variants in 5202 diverse genomes. Science.](https://doi.org/10.1126/science.abg8871)
23. [Jouni Sirén and colleagues (2019). Haplotype-aware graph indexes. Bioinformatics.](https://doi.org/10.1093/bioinformatics/btz575)
24. [One is not enough: On the effects of reference genome for the mapping and subsequent analyses of short-reads](https://journals.plos.org/ploscompbiol/article?id=10.1371%2Fjournal.pcbi.1008678)
25. [Efficient short read mapping to a pangenome that is represented by an elastic degenerate string (GED-MAP)](https://www.ovid.com/journals/bioinf/fulltext/10.1093/bioinformatics/btad320~efficient-short-read-mapping-to-a-pangenome-that-is)
26. [Avi Srivastava and colleagues (2016). RapMap: a rapid, sensitive and accurate tool for mapping RNA-seq reads to transcriptomes. Bioinformatics.](https://doi.org/10.1093/bioinformatics/btw277)
27. [Alignment and mapping methodology influence transcript abundance estimation](https://link.springer.com/article/10.1186/s13059-020-02151-8)

---
*Initially written Sep 29, 2026 · Edited: Oct 15, 2026*

Topic: 生命与健康 › 生物学基础 › 遗传学与基因组参考资料 › Genomics, sequencing, and genome resources › Sequence assembly, alignment, and mapping

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/read-mapping

English original: https://www.edgepedia.org/read-mapping
