Truwl

BETA
Home / Tools / samtools flagstat

Back to samtools

Back To Tools

Overview
samtools flagstat in.sam|in.bam|in.cram Does a full pass through the input file to calculate and print statistics to stdout. Provides counts for each of 13 categories based primarily on bit flags in the FLAG field. Each category in the output is broken down into QC pass and QC fail, which is presented as "#PASS + #FAIL" followed by a description of the category. The first row of output gives the total number of reads that are QC pass and fail (according to flag bit 0x200). For example: 122 + 28 in total (QC-passed reads + QC-failed reads) Which would indicate that there are a total of 150 reads in the input file, 122 of which are marked as QC pass and 28 of which are marked as "not passing quality controls" Following this, additional categories are given for reads which are: secondary 0x100 bit set supplementary 0x800 bit set duplicates 0x400 bit set mapped 0x4 bit 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 And finally, two rows are given that additionally filter on the reference name (RNAME), mate reference name (MRNM), and mapping quality (MAPQ) fields: 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
Associations
Tool Uses
Workflows

No workflows found

Meta
Authors
  • HL
    Heng Li

    wrote most of the initial source codes of SAMtools and various converters.

  • BH
    Bob Handsaker

    A major contributor to the SAM/BAM specification. He designed and implemented the BGZF format, the underlying indexable compression format for the BAM format. BGZF does not support arithmetic between file offsets.

  • JR
    Jue Ruan

    Designed and implemented the RAZF format, an alternative indexable compression format. RAZF is no longer used by or provided with SAMtools. Source code remains available in older SAMtools 0.1.x releases and from the standalone branch in the repository.

  • CH
    Colin Hercus

    updated novo2sam.pl to support gapped alignment by novoalign.

  • PD
    Petr Danecek

    contributed the header parsing library sam_header.c and sam2vcf.pl script.

Websites