---
title: "Mapping Quality and Base Quality Predict Different Errors"
description: "Leviathan Systems — Technical content Published 2026-10-21; updated 2026-10-21."
canonical: "https://www.leviathansystems.co/articles/genomics-ai-sam-mapping-quality-base-call-error-events"
last-updated: "2026-10-21"
---

# Mapping Quality and Base Quality Predict Different Errors

Leviathan Systems — Technical content
Published 2026-10-21; updated 2026-10-21.

Mapping quality estimates an error in reference placement; base quality estimates an error in a called base. Both use Phred scaling, but they concern different events. A genomics AI input that needs placement evidence cannot replace it with high base qualities, and one that needs base-call evidence cannot reconstruct it from MAPQ. Preserve the required quantity, its sequence or alignment association, and its producer context.

## Name the error event the consumer needs

A genomics AI consumer may use called sequence, assigned reference positions or both. When its input requirement includes quality evidence, establish which of those quantities that evidence concerns. A generic promise to retain high-quality reads leaves the event undefined.

SAM/BAM specification 1.6, printing b5341fb dated August 12, 2025, defines MAPQ as -10 log10 of the probability that the mapping position is wrong, rounded to the nearest integer. QUAL represents per-base error probabilities on the Phred scale, encoded with an ASCII offset of 33 in SAM text.

The distinction separates an error in the called letters from an error in assigning the sequence to a reference position. For a feature attached to a named locus, confidently called letters can still be assigned to the wrong occurrence. Conversely, confidence in the assigned position does not establish that every letter was called correctly. The required input definition determines which evidence must survive delivery.

References: [SAM](https://samtools.github.io/hts-specs/SAMv1.pdf)

## Correct letters can leave two possible reference origins

Stipulate an invented query ACGT whose four base calls are correct. One fictional reference contains ACGT at positions 101-104 and again at positions 501-504. The letters alone match both occurrences. Knowing that all four calls are correct still does not reveal which occurrence supplied the sequence.

Assigning the query to the first occurrence or to the second would retain exactly the same called letters. Increasing confidence in those letters therefore leaves the origin question unresolved. This small construction illustrates the missing distinction; it supplies no relative odds and no MAPQ value.

SAM's multiple-mapping discussion recognizes ambiguity from repeats and allows the primary alignment choice to be arbitrary. A primary label is consequently not independent proof of the true origin. The fictional illustration supplies no aligner output or producer model from which a mapping probability could be inferred.

References: [SAM](https://samtools.github.io/hts-specs/SAMv1.pdf)

## Read the score with its event and producer

Inverting the Phred relationship gives P = 10^(-Q/10). Interpreting a reported integer directly gives a nominal probability: score 20 corresponds to 0.01 and score 30 to 0.001. The event label still matters. MAPQ 30 concerns a mapping position; a per-base Q30 concerns one called base.

Copying the number 30 from one field to the other would preserve the arithmetic while changing the asserted event. It would not supply the missing prediction. Nor does a higher number on one scale compensate for absent evidence about the other event.

SAM defines rounded integer Phred scores. Reversing a stored score cannot recover a producer's original unrounded probability. The calculations here use the reported integers as nominal values, rather than claiming that those values were the producer's exact underlying probabilities.

Whether a producer's predictions apply well to the delivered population needs separate evidence. Retain the identified producing platform or program, version and any declared quality transformation relevant to the input. A shared format and score scale alone do not establish comparable calibration between producers.

References: [SAM](https://samtools.github.io/hts-specs/SAMv1.pdf)

## MQ-54: ten mapping errors and 100 base errors are different expectations

MQ-54 is a fictional population of exactly 1,000 distinct mapped single-segment records, one record per segment. Each contains 100 called bases, every MAPQ is 20, and every decoded base quality is Q30. There are no duplicate, secondary or supplementary records in this stipulated population. No sequencing experiment or alignment run was performed.

For the mapping-position event, each segment contributes nominal probability 0.01. The sum is 1,000 x 0.01 = 10 expected mapping-position errors under the supplied predictions.

For the base-call event, the population is 1,000 x 100 = 100,000 calls. Each contributes nominal probability 0.001. The sum is 100,000 x 0.001 = 100 expected base-call errors under the supplied predictions.

Adding probabilities within each defined event population gives its expected count without requiring independence among those events. Its usefulness as a prediction of reality still depends on the probabilities' applicability. Neither calculation observes an error or identifies a particular affected segment.

The two results cannot be added into 110 bad segments. A mapping-position error and a base-call error are different units, multiple wrong calls can occur in one segment, and the two kinds of error can overlap. A correctly called sequence can be wrongly placed, as the separate repeated-occurrence illustration shows.

The example also supplies no joint probability that an entire segment is correctly placed and has no wrong calls. Multiplying nominal success probabilities would introduce assumptions about the joint events. The supplied marginal scores do not establish those assumptions.

## Keep unavailable quality distinct from a supplied estimate

MAPQ 255 is reserved for mapping quality that is unavailable. A whole QUAL field of * means base qualities were not stored. Neither supplies the probabilities used in MQ-54.

Passing 255 through the inverse Phred formula would turn an unavailable estimate into an apparently tiny mapping-error probability. Filling absent base qualities with zero error would manufacture certainty. Retaining the absence lets the receiving owner decide whether the offered input meets its stated requirement.

Mapped state matters too: SAM identifies the unmapped FLAG bit as decisive and permits no assumptions about MAPQ when that bit is set. The mapping arithmetic above applies only to the explicitly stipulated mapped population, not indiscriminately to every alignment-file row.

References: [SAM](https://samtools.github.io/hts-specs/SAMv1.pdf)

## Compare what each offer preserves for the selected input

Suppose a fictional consumer requires both placement-quality evidence for each identified segment alignment and base-quality evidence for its called positions. Offer A retains the sequence and MAPQ, then proposes using that single score wherever a per-base quality is needed. It leaves the required base-call estimates unanswered. Repeating the score across a sequence would add entries without recovering the omitted information.

Offer B retains the required mapping and base-quality quantities with their associations and unavailable states. Its supporting description identifies the producer context and any transformations, and explains how the receiving consumer interprets the supplied values. If the delivered input supports that description, B addresses the stipulated information requirement. A proposal alone still does not establish what reached the consumer.

For placement evidence, retain the relationship to the segment alignment, reference identity and assigned coordinates. For base evidence, retain each quality's relationship to the corresponding called base. Any reordering or derived export must account for those associations; two complete-looking collections of scores can still describe different positions.

A derived representation can meet a defined requirement without preserving every literal SAM field. It needs an explicit event, numerical meaning, association and treatment of unavailable values. A single unlabeled quality feature cannot substantiate preservation of both predictions merely because it contains a large number.

If the selected consumer expressly needs only base-call evidence, retaining mapping quality is not automatically an additional requirement. If it needs both, neither substitutes for the other. Evidence for a combined confidence quantity must explain that quantity's joint model rather than presenting either marginal score as the answer.

The related FASTQ article resolves character decoding and base-quality interpretation. The CIGAR article resolves query-to-reference coordinate relationships. The VCF article resolves genotype calls versus likelihood contrasts. Those are complementary input decisions; none converts a quality estimate into biological truth or a model-performance result.

## Connect a separately needed physical installation

If the selected compute and storage equipment also requires physical installation, Leviathan's Rack-and-Stack & Colocation Installation service provides a route to discuss agreed equipment mounting, IT cabling, labels and physical handoff records.

Use the related service and project inquiry with a nonconfidential equipment, rack, site and connection outline to establish scope and availability. That inquiry concerns physical installation. Bioinformatics, quality interpretation, data preparation and AI input acceptance remain with the appointed data and software specialists.

References: [L1](https://www.leviathansystems.co/services/rack-and-stack)

## Primary sources

- [SAM — SAM/BAM Format Specification 1.6, printing b5341fb, August 12, 2025](https://samtools.github.io/hts-specs/SAMv1.pdf). Checked 2026-10-21. Sections 1.2 and 1.4 define Phred scaling, multiple mapping, mapped state, MAPQ and QUAL, including unavailable values. These format meanings do not validate a producer's calibration. The repeated reference and MQ-54 populations are original fictional examples.
- [L1 — Leviathan Systems: Rack-and-Stack & Colocation Installation](https://www.leviathansystems.co/services/rack-and-stack). Checked 2026-10-21. Agreed equipment mounting, physical IT cabling, labels and installation records support a separately scoped equipment project inquiry.

## Related Leviathan resources

- [FASTQ quality characters and estimated base errors](/articles/genomics-ai-fastq-quality-encoding-error-estimates)
- [SAM CIGAR: query bases and reference positions](/articles/genomics-ai-sam-cigar-query-reference-span)
- [VCF genotype calls and likelihood contrasts](/articles/genomics-ai-vcf-genotype-likelihood-versus-call)
- [Rack-and-Stack & Colocation Installation](/services/rack-and-stack)
- [Discuss a separate physical equipment installation](/contact?service=rack-and-stack&from=%2Farticles%2Fgenomics-ai-sam-mapping-quality-base-call-error-events)

## Does the chosen equipment need physical installation?

Share a nonconfidential equipment, rack, site and IT connection outline to discuss physical installation scope, handoff requirements and availability.

[Discuss the scope](/contact?service=rack-and-stack&from=/articles/genomics-ai-sam-mapping-quality-base-call-error-events)
