SAM Flag Calculator

Explore more tools

Background
SAM flags contain alignment information about each read (e.g. Is the read unmapped? Is the read paired?). In SAM/BAM files, this flag is stored as a number, but it represents a set of 12 true/false options in base 2 (binary). Here is an example SAM record, with the flag highlighted:
ReadName   Flag    Chrom     Position   MapQ    CIGAR    ...
read1      16      chr1      10000      30      101M     ...
read2      4       *         0          255     *        ...
Calculator
Options: Suppl. alignment PCR duplicate Fail QC Secondary alignment Read 2 Read 1 Mate rev. comp. Rev. comp. Mate unmapped Read unmapped Proper pair Paired-end
Binary: 0 0 0 0 0 0 0 0 0 1 0 0
SAM Flag (decimal):