NAME
samtools-flagstat - counts the number of alignments for each FLAG typeSYNOPSIS
samtools flagstat in.sam|in.bam|in.cramDESCRIPTION
Does a full pass through the input file to calculate and print statistics to stdout.122 + 28 in total (QC-passed reads + QC-failed reads)
- primary
- neither 0x100 nor 0x800 bit set
- secondary
- 0x100 bit set
- supplementary
- 0x800 bit set
- duplicates
- 0x400 bit set
- primary duplicates
- 0x400 bit set and neither 0x100 nor 0x800 bit set
- mapped
- 0x4 bit not set
- primary mapped
- 0x4, 0x100 and 0x800 bits not set
- paired in sequencing
- 0x1 bit set
- read1
- both 0x1 and 0x40 bits set
- read2
- both 0x1 and 0x80 bits set
- properly paired
- both 0x1 and 0x2 bits set and 0x4 bit not set
- with itself and mate mapped
- 0x1 bit set and neither 0x4 nor 0x8 bits set
- singletons
- both 0x1 and 0x8 bits set and bit 0x4 not set
- with mate mapped to a different chr
- 0x1 bit set and neither 0x4 nor 0x8 bits set and MRNM not equal to RNAME
- with mate mapped to a different chr (mapQ>=5)
- 0x1 bit set and neither 0x4 nor 0x8 bits set and MRNM not equal to RNAME and MAPQ >= 5
ALTERNATIVE OUTPUT FORMATS
The -O option can be used to select two alternative formats for the output. Using -O tsv selects a tab-separated values format that can easily be imported into spreadsheet software. In this format the first column contains the values for QC-passed reads, the second column has the values for QC-failed reads and the third contains the category names. Using -O json generates an ECMA-404 JSON data interchange format object <https://www.json.org/>. The top-level object contains two named objects QC-passed reads and QC-failed reads. These contain the various categories listed above as names and the corresponding count as value.32 + 0 mapped (94.12% : N/A)
OPTIONS
- -@ INT
- Set number of additional threads to use when reading the file.
- -O FORMAT
- Set the output format. FORMAT can be set to `default', `json' or `tsv' to select the default, JSON or tab-separated values output format. If this option is not used, the default format will be selected.
AUTHOR
Written by Heng Li from the Sanger Institute.SEE ALSO
samtools(1), samtools-idxstats(1), samtools-stats(1) Samtools website: <http://www.htslib.org/>2 September 2022 | samtools-1.16.1 |