Mapping quality filtering is a critical preprocessing step in variant calling pipelines that removes aligned reads whose reported genomic position is likely incorrect. The mapping quality (MAPQ) score, computed by aligners like BWA-MEM or minimap2, is a Phred-scaled probability that the read's alignment is wrong. A MAPQ of 30 corresponds to a 1-in-1,000 chance of misalignment. By applying a minimum threshold—typically MAPQ ≥ 20 or 30—analysts eliminate reads mapping to repetitive regions, segmental duplications, or homologous sequences where the true origin is ambiguous.
Glossary
Mapping Quality Filtering

What is Mapping Quality Filtering?
Mapping quality filtering is the computational process of discarding sequencing reads with a low probability of correct genomic alignment to reduce false positive variant calls caused by mismapped reads.
Without stringent mapping quality filtering, mismapped reads introduce false positive variant calls by depositing non-reference alleles at incorrect loci. This is especially problematic for pseudogenes and low-complexity regions, where paralogous sequences confuse short-read aligners. The filter is applied using tools like samtools view -q on BAM files before variant calling. While essential for specificity, overly aggressive filtering can reduce sensitivity in highly polymorphic regions or create reference bias, necessitating careful threshold calibration against truth sets like Genome in a Bottle.
Key Characteristics of Mapping Quality Filtering
Mapping quality filtering is a critical preprocessing step that discards sequencing reads with a low probability of being correctly aligned to the reference genome, directly reducing false positive variant calls caused by mismapped reads.
The Phred-Scaled MAPQ Score
The Mapping Quality (MAPQ) score is a Phred-scaled probability that the read is misaligned. A score of 30 implies a 1 in 1,000 chance of incorrect alignment, while a score of 0 indicates a multi-mapping read with no unique best hit. Filtering on a threshold (typically MAPQ ≥ 20 or 30) is the primary mechanism for removing ambiguous reads from repetitive or paralogous regions.
Mismatch Density and Edit Distance
Beyond the aggregate MAPQ score, filtering often involves analyzing the edit distance or mismatch density of an alignment. A read with an unexpectedly high number of mismatches or gaps relative to the reference may represent a pseudogene or a structural variant rather than a true single-nucleotide variant. Hard-clipping or discarding reads with excessive soft-clipped bases prevents false variant calls near insertion/deletion breakpoints.
Multi-Mapping and Repeat Masking
Short reads originating from low-complexity regions or segmental duplications often align equally well to multiple genomic loci. Aligners typically assign a MAPQ of 0 to these reads. Filtering them out is essential to avoid spurious heterozygous calls caused by aggregating signal from paralogous sequences. Advanced pipelines may also use a k-mer uniqueness track to pre-emptively mask problematic regions.
Supplementary and Chimeric Read Filtering
A single sequenced fragment can produce multiple alignment records: a primary linear alignment and supplementary chimeric or split-read alignments. For standard variant calling, supplementary alignments must be flagged and filtered out (using SAM flag 2048) to prevent double-counting evidence. However, these reads are retained for structural variant detection to identify breakpoints.
Base Alignment Quality (BAQ) Adjustment
Standard MAPQ applies to the entire read, but local alignment artifacts near indels can cause systematic base-level errors. Base Alignment Quality (BAQ) is a computational adjustment that lowers the quality score of individual bases hidden within a gapped alignment. This prevents false single-nucleotide variant calls caused by the misplacement of insertions or deletions by the aligner.
Impact on Variant False Discovery Rate
Aggressive mapping quality filtering is the most effective single step for controlling the False Discovery Rate (FDR) in variant calling. By removing reads with MAPQ < 20, pipelines can eliminate the majority of false positives arising from mismapped reads in segmental duplications. However, overly strict filtering can cause allelic dropout in highly polymorphic regions, reducing sensitivity for true variants.
Frequently Asked Questions
Mapping quality filtering is a critical preprocessing step in variant calling pipelines that removes sequencing reads with a low probability of being correctly aligned to the reference genome, directly reducing false positive variant calls caused by mismapped reads in repetitive or paralogous genomic regions.
Mapping quality (MAPQ) is a Phred-scaled probability that a sequencing read is incorrectly aligned to the reference genome. It is calculated as MAPQ = -10 * log10(P{read is wrongly mapped}). A MAPQ of 20 indicates a 1% chance of misalignment, while a MAPQ of 30 indicates a 0.1% chance. Aligners like BWA-MEM and Bowtie2 compute MAPQ by evaluating the uniqueness of the alignment, the number of mismatches, and the presence of alternative mapping locations. Reads that map equally well to multiple genomic loci—common in segmental duplications and low-complexity regions—receive low MAPQ scores because the aligner cannot confidently resolve their true origin. The calculation incorporates the Smith-Waterman alignment score of the primary alignment compared to all secondary alignments, effectively quantifying the ratio of the best hit to the next-best hit.
Mapping Quality Filtering vs. Related Quality Control Methods
A comparison of mapping quality filtering against other quality control methods used in variant calling pipelines, highlighting their primary targets, mechanisms, and roles in reducing false positive calls.
| Feature | Mapping Quality Filtering | Base Quality Score Recalibration (BQSR) | Variant Quality Score Recalibration (VQSR) |
|---|---|---|---|
Primary Target | Read alignment accuracy | Per-base error probability | Variant call confidence |
Input Data | MAPQ scores from aligner | Raw base quality scores + covariates | Variant annotations + truth sets |
Stage in Pipeline | Post-alignment, pre-variant calling | Pre-variant calling | Post-variant calling |
Corrects Systematic Errors | |||
Uses Machine Learning | |||
Requires Known Truth Set | |||
Typical False Positive Reduction | 30-70% of mismapped reads | Variable by platform | Up to 90% of artifacts |
Primary Artifact Addressed | Mismapped reads, paralogous alignments | Sequencing chemistry errors | Systematic variant calling errors |
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Core concepts and techniques essential to understanding how mapping quality filtering improves variant calling accuracy.
Mapping Quality Score (MAPQ)
A Phred-scaled probability that a read is incorrectly aligned. MAPQ = -10 log₁₀ P(wrong). A score of 30 means a 1/1000 chance of misalignment. Filtering on MAPQ thresholds (e.g., MAPQ ≥ 20) is the primary mechanism for removing ambiguously mapped reads before variant calling.
Multi-Mapping Read Filtering
Reads that align equally well to multiple genomic locations are flagged as multi-mappers. These arise from repetitive elements, paralogous genes, and segmental duplications. Discarding reads with MAPQ 0 (non-unique mappers) prevents false variant calls caused by reads piling up at the wrong paralogous locus.
Base Alignment Quality (BAQ)
A per-base adjustment that accounts for local alignment uncertainty around indels. BAQ recalculates the probability that a base is correctly aligned by considering alternative local alignments, reducing false single nucleotide variant calls near insertion-deletion events without discarding entire reads.
Pair-End Mapping Consistency
Properly paired reads have mates mapping in opposite orientations at an expected insert size distance. Discordant pairs—mates on the same strand, wrong orientation, or abnormal insert size—indicate structural variants or misalignment. Filtering on pair consistency flags removes chimeric and artefactual alignments.
Supplementary Alignment Filtering
Chimeric reads that split across distant genomic regions produce one primary and one or more supplementary alignments. These are flagged with the SA tag in BAM files. Excluding supplementary alignments from variant calling prevents double-counting read evidence and false structural variant calls.
Mappability Track Masking
Pre-computed genome-wide tracks that score each position's uniqueness based on k-mer frequency. Regions with low mappability (< 1 unique mapping for a read of given length) are masked before variant calling. This prevents systematic false positives in segmental duplications and centromeric repeats.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us