Maximum allowed (mismatches) SNPs/INDELs in one read in Bowtie2 alignment
Entering edit mode
6.4 years ago


My question is - How many mismatches are allowed (on average/or hard limit) in a bowtie 2 alignment before it moves on to find a new home for a read. I know the we can control the number of mismatches allowed in the seed with -N option. And I know that with the -D option, I control the seed extension attempts that "fail". 

So I guess my question now is, when does an extension "fail"? The manual says, when an extension does not yield a new best or a new second-best alignment, it fails.

I'm not able to map this definition to a number (of mismatches). I've re-read the method to calculate the alignment score many times now. Would two consecutive SNPs be allowed, or do two SNPs need to have a certain number of matched bases between them so that the overall alignment doesn't "fail"?

I think, in my naive way, I've explained the core issues of my question. I'll edit if it's not entirely clear.



Bowtie2 alignment number mismatches maximum • 3.0k views
Entering edit mode
6.4 years ago
thackl ★ 2.9k

-D and -N aren't directly related to the number of mismatches. An alignment fails, if it does not meet the --score-min criteria.

For global alignment costs are --ma 0, --mm 2-6 - depending on base quality. Score is given by --score-min L,-0.6,-0.6. Given a 100 bp read the --score-min computes to -60. Given only high quality SNPs (--mm 6), an alignment can have up to 10 mismatches and still meet the score threshold. However, with 10 mismatches randomly distributed along the read, you will need sensistive seeding parameters to initialize the alignment in the first place.

To limit bowtie2 to 2 mismatches per 100 bp in global mode, you can set --score-min L,0,-13. To limit reads of arbitrary length to 2 mismatches, you can set --score-min C,-13,0.

Given default gap costs (5,3), this would also allow 2 non-adjacent 1 bp gaps or one 3 bp gap in your alignment.

Entering edit mode

This is very helpful. Thanks!


Login before adding your answer.

Traffic: 2383 users visited in the last hour
Help About
Access RSS

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6