# Is the Bowtie2 MAPQ score dependent on the database index?

I have two very similar genomes in my bowtie2 database (nuc similarity > 90 %). When mapping with bowtie2 against this database, most of the reads that are mapped to one of these genomes have a MAPQ score of 0. Only at the positions that are different between the two genomes I get higher MAPQ scores.

I also created a database with just one of the genomes, inspecting the MAPQ score of a single read. This single read gets a MAPQ score of 24 when the database contains only one genome, but drops to zero when two similar genomes are in the database.

Is this the expected behavior? My understanding of the MAPQ score computation is, that the alignment score of a read at a specific location is only compared to the score at other positions within the same reference, not across the whole database. If the alignment scores for a read are then pretty close to each other, it is assumed that the read does not map uniquely, which is reflected in a low MAPQ score.

So my question is, whether the alignment score of a read is compared to other alignments of this read within the same reference OR against alignments with the whole database index? Changing the database, would then result in different MAPQ scores.

• Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
– Community Bot
Apr 25 at 16:46

Yes, this is expected. I am not sure what you mean by "reference" vs "database", but what you do is to index a fasta file or a collection of fasta files. That index you create by that is what bowtie2 alignes against. It does not know whether the index consisted of one, ten or a thousand fasta files, it just maps against the entire index and then check whether it can uniquely (or not) place the reads. If you combined two genomes into one index and the genomes are very similar then indeed many reads will map equally well to them and that manifests as MAPQ 0 (or low).
If a read maps equally well to two different locations in the reference database, then the minimum probability that read maps to another location is 0.5. MAPQ scores are ten times the negative log10 of the probability of a mismatch, so a mismatch probably of 0.5 would lead to a maximum MAPQ score of $$-10*log_{10}(0.5) = 3$$. If there's any doubt about the mapping (e.g. a mismatch in the sequenced read), or the read could map to more than two locations, then that probability will drop further. I would not be surprised if these MAPQ scores, where the location is impossible to precisely determine, were rounded down to 0.