This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Mismatch Option In Bowtie2

Hi Everyone

I am using bowtie2. I want to set my max mismatches to 2 for my read sequence.

Can this be done in bowtie2. I know bowtie1 has option of -v but i cannot find it in bowtie2.

Any help is appreciated

Regards Varun

bowtie2

2 answers

You can specify number of mismatch in a seed alignment using -N. Your alignment can still have more than -N mismatches as there can be mismatches in non-seed part of the read. If you want you can specify the seed length to some number that is comparable to the read length. But this way you will miss loose lot of alignments as it will be too stringent. If I would be in your place, I will use the default alignment parameter and then filter out all the reads that have two or less mismatches from the output sam file. You can use XM tag from the SAM file to do the same.

XM:i:<n> The number of mismatches in the alignment. Only present if SAM record is for an aligned read

thanks just what I thought too

Varun

Ashutosh

Filtering through XM tag for single end read is OK, but in case of pair-end I have a confusion because both pairs might have different number of mismatches and in this way one can miss a pair in all such cases.

Log in to answer this question.