MAPQ Filter Fraction
Filter SAM mapping qualities by threshold while treating MAPQ 255 as unavailable.
Description
SAM mapping quality describes confidence in the assigned mapping.
SAM mapping quality describes confidence in the assigned mapping. Value 255 means the quality is unavailable, rather than exceptionally high.1
Filter SAM mapping qualities by threshold while treating MAPQ 255 as unavailable.
When to use MAPQ Filter Fraction
Use this for the following task: Filter SAM mapping qualities by threshold while treating MAPQ 255 as unavailable.
Prepare the caller-filtered sequences, counts, coordinates or annotations requested below. Keep identifiers and paired lists aligned on the same reference.
How to use MAPQ Filter Fraction and understand its results
- Prepare the caller-filtered sequences, counts, coordinates or annotations requested below. Keep identifiers and paired lists aligned on the same reference.
- Enter mappingQualities, minimumMapq using the field table, then run the tool.
- Read passingIndexes, unknownQualityCount, passPercent. Interpret flags, units, ordering and placeholder values using the rules below.
- Review any reported issue or failed check, correct the supplied values when appropriate, and verify the result in its intended context.
| Input field | Meaning | Value type and bounds | Requirement |
|---|---|---|---|
| mappingQualities | SAM MAPQ integers 0 through 255; 255 is unavailable and never passes. | list of integer; minimum entries 1; maximum entries 100000; each entry: integer; minimum 0; maximum 255 | Required |
| minimumMapq | Minimum mapq | integer; minimum 0; maximum 254 | Required |
Use integer qualities 0–255 and a threshold 0–254. Return zero-based passing indices, unknown count and passing percentage over all supplied entries.2
pass when MAPQ != 255 AND MAPQ ≥ minimumMapq This summarizes the declared operation. Units, indexing, inclusivity and exceptional cases are explained in the surrounding text.
| Output field | Meaning | Value type |
|---|---|---|
| passingIndexes | Passing indexes | list of integer |
| unknownQualityCount | Unknown quality count | integer |
| passPercent | Percentage of all supplied reads that pass, including unavailable qualities in the denominator. | number |
{
"input": {
"mappingQualities": [
0,
20,
60,
255
],
"minimumMapq": 20
},
"output": {
"passingIndexes": [
1,
2
],
"unknownQualityCount": 1,
"passPercent": 50
}
} Limitations and assumptions
Unavailable qualities remain in the percentage denominator. This does not recalibrate aligner scores or assess base quality.
The tool operates on supplied local data; alignment, filtering and annotation must already be appropriate for the stated calculation. Malformed requests produce input errors. A successfully evaluated request can still contain false flags, empty result lists or a result outside the supplied threshold; those outcomes have the meanings stated above.
Alternative or Complementary methods
Choose SAM Flag Decode for this operation: Decode SAM FLAG bits and preserve unsupported high bits explicitly. For a complementary task, use Error Probability Phred for this operation: Convert error probabilities in (0,1] to Phred quality scores.
Further background: Background specification: MAPQ Filter Fraction.
References
-
Background specification: MAPQ Filter Fraction — GA4GH / HTS specifications
-
MAPQ Filter Fraction — tool.io
Similar or alternative tools
- SAM Flag Decode
Decode SAM FLAG bits and preserve unsupported high bits explicitly.
- Error Probability Phred
Convert error probabilities in (0,1] to Phred quality scores.