Flaggstat
Flaggstat is a utility within the SAMtools software suite used to summarize alignment data from BAM or SAM files. It analyzes the flag field of each read and produces a concise report describing the composition of reads in the alignment, such as how many reads were mapped and how many were paired. The name Flaggstat is a variant spelling; the canonical command in SAMtools is flagstat.
The program reads an input BAM/SAM file and outputs several lines, each reporting counts for a category.
Flaggstat is widely used as a quick quality-control step before downstream analyses. It does not provide per-base
Usage is straightforward: run samtools flagstat <alignment.bam>. In newer SAMtools versions or with large datasets, the