This page requires JavaScript. Please enable it in your browser settings.
SAM flag must only contain digits.
flag must be <= 4095 (111,111,111,111).
Paired: 0

# Decimal Description of first read
1 1 Read paired
2 2 Read mapped in proper pair
3 4 Read unmapped
4 8 Mate unmapped
5 16 Read reverse strand
6 32 Mate reverse strand
7 64 First in pair
8 128 Second in pair
9 256 Not primary alignment
10 512 Read fails platform/vendor quality checks
11 1024 Read is PCR or optical duplicate
12 2048 Supplementary alignment
Sum 0
Decimal Description of second read
1 Read paired
2 Read mapped in proper pair
4 Read unmapped
8 Mate unmapped
16 Read reverse strand
32 Mate reverse strand
64 First in pair
128 Second in pair
256 Not primary alignment
512 Read fails platform/vendor quality checks
1024 Read is PCR or optical duplicate
2048 Supplementary alignment
0

Common flags*

One of the reads is unmapped:

73, 133, 89, 121, 165, 181, 101, 117, 153, 185, 69, 137

Both reads are unmapped:

77, 141

Mapped within the insert size and in correct orientation:

99, 147, 83, 163

Mapped within the insert size but in wrong orientation:

67, 131, 115, 179

Mapped uniquely, but with wrong insert size:

81, 161, 97, 145, 65, 129, 113, 177

* Collected from here

Instruction:

sam_format_annotated_example

Above is a SAM file excerpt adapted from the SAM format specification (last checked version: b1ae9f9) with each column annotated. The FLAG column is highlighted in red.

In the input box to the top, please enter a SAM flag (e.g. 99) of your interest to get an instant interpretation of its meaning, or click on arbitrary rows in the table to select/deselect the bits (one bit per row) and calculate the corresponding flag value.

As you can see, there are 12 bits and each bit represents some information about the read as shown in the Description column. Your typed flag is simply a decimal representation of the sum of the selected bits.

If you would also like to see the binary and heximal values of corresponding bits, please refer to the previous flag page. That page does not show the information about the paired read, and may be deprecated in the future if not many people find it very useful.