samtools-idxstats(1)

samtools-idxstats1

Reports alignment summary statistics

Usage

samtools {idxstats in.sam | in.bam | in.cram}

Overview

Retrieve and print stats in the index file corresponding to the input file. Before calling idxstats, the input BAM file should be indexed by samtools index.

If run on a SAM or CRAM file or an unindexed BAM file, this command will still produce the same summary statistics, but does so by reading through the entire file. This is far slower than using the BAM indices.

The output is TAB-delimited with each line consisting of reference sequence name, sequence length, # mapped read-segments and # unmapped read-segments. It is written to stdout. Note this may count reads multiple times if they are mapped more than once or in multiple fragments.

Options

-X

This option will allow the user to specify a customised index file location. e.g.

samtools idxstat [options] -X /data_folder/data.bam /index_folder/index.bai

Releases

3 releases since Debian 11 (Bullseye); the text changed 2 times.

  1. 11
  2. 12
  3. 13

-X since Debian 13 (Trixie).

Author

Written by Heng Li from the Sanger Institute.

From samtools 1.21-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.