Description
Read the reverse-complement flag from a BAM/SAM flag word.
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.
Read the reverse-complement flag from a BAM/SAM flag word.
When to use this tool
Use BAM Flag Strand Token when checking the stated alignment flag, operation, span or gap-scoring convention.
How to use the tool and how it works
- Enter flag. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read reverseComplemented, strandToken. Inspect reverseComplemented before interpreting the associated values.
Read the reverse-complement flag from a BAM/SAM flag word. Require whole flag 0..65535; reverseComplemented tests bit 0x10, strandToken is minus when set and plus otherwise.1
SAM/BAM defines separate flag, quality and CIGAR conventions. This local operation does not validate a complete alignment record.2
| Input field | Meaning and units | Accepted input |
|---|---|---|
| flag | Flag | Required. Safe integer; minimum 0; maximum 65535. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| reverseComplemented | Reverse Complemented | Required. Boolean. |
| strandToken | Strand Token | Required. Text; maximum UTF-16 length 8192. |
{
"input": {
"flag": 16
},
"output": {
"reverseComplemented": true,
"strandToken": "-"
}
} Limitations and assumptions
- Other flag relationships, unmapped semantics, reference sequence and actual alignment orientation are not validated.
- 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
-
Calculation and input contract: bioinformatics/bam-flag-strand-token — tool.io
-
SAM/BAM format specification, version 1.6 — SAM/BAM Format Specification Working Group
Similar or alternative tools
- SAM Mate Unmapped Position Policy
Return mate-unmapped and position-known flags independently.
- Bioinformatics: GFF Phase Token Check Tool
Parse one GFF3 phase token 0/1/2 or unknown dot, retaining unknown status; does not infer CDS frame or validate an entire feature.