---
name: "samtools-flags"
section: "1"
platform: "linux"
package: "samtools"
version: "1.21-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/samtools-flags"
---

# samtools-flags(1)

convert between textual and numeric flag representation.

## NAME

samtools-flags - convert between textual and numeric flag representation.

## SYNOPSIS

samtools flags *FLAGS*...

## DESCRIPTION

Convert between textual and numeric flag representation.

Each *FLAGS* argument may be either an integer (in decimal, hexadecimal, or octal) representing a combination of the listed numeric flag values, or a comma-separated string *NAME***,**...**,***NAME* representing a combination of the flag names listed below.

**FLAGS:**

| | | |
| --- | --- | --- |
| **0x1** | PAIRED | paired-end (or multiple-segment) sequencing technology |
| **0x2** | PROPER\_PAIR | each segment properly aligned according to the aligner |
| **0x4** | UNMAP | segment unmapped |
| **0x8** | MUNMAP | next segment in the template unmapped |
| **0x10** | REVERSE | SEQ is reverse complemented |
| **0x20** | MREVERSE | SEQ of the next segment in the template is reverse complemented |
| **0x40** | READ1 | the first segment in the template |
| **0x80** | READ2 | the last segment in the template |
| **0x100** | SECONDARY | secondary alignment |
| **0x200** | QCFAIL | not passing quality controls |
| **0x400** | DUP | PCR or optical duplicate |
| **0x800** | SUPPLEMENTARY | supplementary alignment |

## AUTHOR

Written by Petr Danacek from the Sanger Institute.

## SEE ALSO

[*samtools*(1)](/samtools/1.md)

Samtools website: \<http://www.htslib.org/\>
