How does BWA-mem calculate mapping quality (MAPQ) for a given read? I've seen plenty of posts discussing how this is done in BWA, but not using BWA-mem. Is the MQ simply a scale between 0 and 60 (what appears to be the maximum)? Or do certain values have certain meaning? For example, I know in Bowtie2 certain MAPQ values correspond to reads that have one best match (i.e. AS > XS), but is not a simple scale where a larger number corresponds to higher quality ( http://biofinysics.blogspot.com.au/2014/05/how-does-bowtie2-assign-mapq-scores.html ).