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

  1. Prepare the caller-filtered sequences, counts, coordinates or annotations requested below. Keep identifiers and paired lists aligned on the same reference.
  2. Enter mappingQualities, minimumMapq using the field table, then run the tool.
  3. Read passingIndexes, unknownQualityCount, passPercent. Interpret flags, units, ordering and placeholder values using the rules below.
  4. Review any reported issue or failed check, correct the supplied values when appropriate, and verify the result in its intended context.
Input fieldMeaningValue type and boundsRequirement
mappingQualitiesSAM 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 255Required
minimumMapqMinimum mapqinteger; minimum 0; maximum 254Required

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 fieldMeaningValue type
passingIndexesPassing indexeslist of integer
unknownQualityCountUnknown quality countinteger
passPercentPercentage of all supplied reads that pass, including unavailable qualities in the denominator.number
json
{
  "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

  1. Background specification: MAPQ Filter Fraction — GA4GH / HTS specifications

  2. MAPQ Filter Fraction — tool.io

Similar or alternative tools

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies