Bowtie2用来快速比对短reads(50-100bp)与参考基因组,与常规的比对软件不同的是(如blast),Bowtie在比对比较短的reads(less than 1024 base) 与 较大的参考(基因组) 时效果更好,也更快。
许多其他的软件经常会调用Bowtie ,如常见的 TopHat , Cufflinks 等
- Read: GACTGGGCGATCTCGACTTCG
- ||||| |||||||||| |||
- Reference: GACTG--CGATCTCGACATCG
与Bowtie1的区别
For reads longer than about 50 bp Bowtie 2 is generally faster, more sensitive, and uses less memory than Bowtie 1. For relatively short reads (e.g. less than 50 bp) Bowtie 1 is sometimes faster and/or more sensitive. B
Bowtie 2 supports gapped alignment with affine gap penalties. Number of gaps and gap lengths are not restricted, except by way of the configurable scoring scheme. Bowtie 1 finds just ungapped alignments.
Bowtie 2 supports local alignment, which doesn't require reads to align end-to-end. Local alignments might be "trimmed" ("soft clipped") at one or both extremes in a way that optimizes alignment score. Bowtie 2 also supports end-to-end alignment which, like Bowtie 1, requires that the read align entirely.
There is no upper limit on read length in Bowtie 2. Bowtie 1 had an upper limit of around 1000 bp.
Bowtie 2 allows alignments to overlap ambiguous characters (e.g.
N
s) in the reference. Bowtie 1 does not.Bowtie 2 does away with Bowtie 1's notion of alignment "stratum", and its distinction between "Maq-like" and "end-to-end" modes. In Bowtie 2 all alignments lie along a continuous spectrum of alignment scores where the scoring scheme, similar to Needleman-Wunsch and Smith-Waterman.
Bowtie 2's paired-end alignment is more flexible. E.g. for pairs that do not align in a paired fashion, Bowtie 2 attempts to find unpaired alignments for each mate.
Bowtie 2 reports a spectrum of mapping qualities, in contrast for Bowtie 1 which reports either 0 or high.
Bowtie 2 does not align colorspace reads.
Bowtie2的参数与基因组索引(index of genome)的格式都与Bowtie1不同
Bowtie的一些参数解释(常见的),具体的见官方手册
End to end alignment versus local alignment
End to end (全局比对)举例:
local alignment example (局部比对)举例
默认情况下,Bowtie2进行全局比对,也称作 "untrimmed " or "unclopped" alignment
也可以使用参数 --local 进行局部比对,此时Bowtie2 可能会 "trim" or "clip" 短序列的首部或者尾部来最大化比对分数,分数越高,相似度越高。
软件有默认的分数阈值,当一个比对的分数达到或超过这个阈值时,则认为是一个“有效” 的比对
全局比对默认值为:-0.6 + -0.6×read length
局部比对: 20 + 8.0 × ln(read length)
可以使用 --score-min 来设定阈值
Mapping quality : higher = more unique
因为基因组中存在着大量的重复序列,所以当一个read来自与多个重复或者相似的基因时,Bowtie2无法确定这个read到底来自于哪个基因。
所以Bowtie2用 mapping quality 来代表一个read来自于某个基因的确信度 :Q = -10 log 10p
在SAM文件中后缀为 MAPQ
align paired-end inputs
Bowtie2支持常见的由测序仪产生的paired-end or mate-pair reads,使用参数 -1 -2 来表示一对pair-end 也就是双端测序的reads,同时产生2个SAM文件。
参数 --ff --fr --rf用来指双端测序两个reads的方向
参数 -I /-X 来设定双端测序两个reads之间的距离(该设定会使Bowtie2的速度变慢),也叫作(outer distance)
By default, Bowtie 2 searches for both concordant and discordant alignments, though searching for discordant alignments can be disabled with the --no-discordant
option.
所以当pair-end 没有匹配时,会将reads当做非paired-end来再次进行比对
使用参数 --no-mixed 来取消这一默认设定
结果解读
通常情况下,Bowtie2在寻找到一个有效比对后,还会继续寻找分值相等或者更高的比对(贪婪),reads可能map到多个不同位置,而Bowtie2只会输出分值最高的一个。当有多个分值相同的比对时,使用产生“伪随机数”的方法来决定输出哪一个
参数:-D 设置动态规划问题的上限
参数:
-R 设置Bowtie2 继续寻找的最大时间 (一般不要修改,可能会错失比对)
参数 -k 会报告每一个找到的有效比对,后加整数可以规定数目,找到的比对没有特定的顺序
参数 -a 报告每一个找到的有效比对,不加上限
Ambiguous characters
除了"ACGT"意外的任意非空白字符都被认为是 "ambiguous"。
"N"是参考基因组常见的一个 ambiguous字符,Bowtie2将参考基因组的所有ambiguous字符都当做"N"
参数 --np/ --n-ceil 设置允许ambiguous字符的上限
Bowtie2本身包含了许多预设,见documentation for the preset options
Next: 使用Trinity拼接以及分析差异表达一个小例子