Category

Sam/Bam Manipulation


Usage

samtools stats [options] in.sam|in.bam|in.cram [region...]


Manual

Options

  • -c MIN,MAX,STEP: Set coverage distribution to the specified range (MIN, MAX, STEP all given as integers). Default: [1,1000,1]
  • -d, --remove-dups: Exclude from statistics reads marked as duplicates
  • -f, --required-flag STR|INT: Required flag, 0 for unset. See also samtools flags. Default: [0]
  • -F, --filtering-flag STR|INT: Filtering flag, 0 for unset. See also samtools flags. Default: [0]
  • --GC-depth FLOAT: The size of GC-depth bins (decreasing bin size increases memory requirement). Default: [2e4]
  • -i, --insert-size INT: Maximum insert size. Default: [8000]
  • -I, --id STR: Include only listed read group or sample name.
  • -l, --read-length INT: Include in the statistics only reads with the given read length. Default: [-1]
  • -m, --most-inserts FLOAT: Report only the main part of inserts. Default: [0.99]
  • -P, --split-prefix STR: A path or string prefix to prepend to filenames output when creating categorized statistics files with -S/--split. Default: [input filename]
  • -q, --trim-quality INT: The BWA trimming parameter. Default: [0]
  • -r, --ref-seq FILE: Reference sequence (required for GC-depth and mismatches-per-cycle calculation). Default: []
  • -S, --split TAG: In addition to the complete statistics, also output categorized statistics based on the tagged field TAG (e.g., use --split RG to split into read groups). Categorized statistics are written to files named <prefix>_<value>.bamstat, where prefix is as given by --split-prefix (or the input filename by default) and value has been encountered as the specified tagged field's value in one or more alignment records.
  • -t, --target-regions FILE: Do stats in these regions only. Tab-delimited file chr,from,to, 1-based, inclusive. Default: []
  • -x, --sparse: Suppress outputting IS rows where there are no insertions.
  • -p, --remove-overlaps: Remove overlaps of paired-end reads from coverage and base count computations.
  • -g, --cov-threshold INT: Only bases with coverage above this value will be included in the target percentage computation. Default: [0]
  • -X: If this option is set, it allows the user to specify customized index file location(s) if the data folder does not contain any index file. Example usage: samtools stats [options] -X /data_folder/data.bam /index_folder/data.bai chrM:1-10
  • -@, --threads INT: Number of input/output compression threads to use in addition to the main thread. Default: [0]

 

File formats this tool works with
BAMCRAMSAM

Share your experience or ask a question