Skip to content

Main content

SAM Mate Unmapped Position Policy Tool

SAM bit 0x8 reports an unmapped mate even when its coordinate fields carry a placement anchor; do not infer mapping from position alone.

Loading tool…

Description

Return mate-unmapped and position-known flags independently.

Sequence alignments distinguish flag bits, query/reference coordinates, CIGAR operations and scoring conventions. A single flag or length contribution does not establish a complete valid alignment; consuming reference bases differs from consuming query bases or counting a gap penalty.

Return mate-unmapped and position-known flags independently.

When to use this tool

Use SAM Mate Unmapped Position Policy when checking the stated alignment flag, operation, span or gap-scoring convention.

How to use the tool and how it works

  1. Enter flag, mateReference, matePosition. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read mateUnmapped, positionKnown. Inspect mateUnmapped, positionKnown before interpreting the associated values.

Return mate-unmapped and position-known flags independently. Require whole flag 0..65535, nonnegative whole matePosition and nonempty mateReference; bit 0x8 marks unmapped, positionKnown requires reference not asterisk and position > 0.1

SAM/BAM defines separate flag, quality and CIGAR conventions. This local operation does not validate a complete alignment record.2

Input fieldMeaning and unitsAccepted input
flagFlagRequired. Safe integer; minimum 0; maximum 65535.
mateReferenceMate ReferenceRequired. Text; maximum UTF-16 length 8192.
matePositionMate PositionRequired. Safe integer; minimum 0.
Output fieldInterpretationReturned shape
mateUnmappedMate UnmappedRequired. Boolean.
positionKnownPosition KnownRequired. Boolean.
json
{
  "input": {
    "flag": 9,
    "mateReference": "*",
    "matePosition": 0
  },
  "output": {
    "mateUnmapped": true,
    "positionKnown": false
  }
}

Limitations and assumptions

  • Known position may coexist with an unmapped flag; this does not validate a complete SAM alignment or resolve the mate.
  • Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
  • Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.

Alternative or Complementary methods

Use a complete SAM/BAM and reference-aware validator or alignment method with explicit clipping, coordinate and scoring policies for full processing.

References

  1. Calculation and input contract: bioinformatics/sam-mate-unmapped-position-policy — tool.io

  2. SAM/BAM format specification, version 1.6 — SAM/BAM Format Specification Working Group

Similar or alternative tools