Samtools: Depth

Calculate sequencing depth and coverage across genomic positions from SAM, BAM, or CRAM files.

Accepted format: .sam, .bam, .cram

Computing Read Depth Using samtools depth


Overview

samtools depth calculates the read depth at each genomic position from a SAM, BAM, or CRAM file. Read depth represents the number of sequencing reads aligned to a particular location in the reference genome.

It is commonly used to evaluate sequencing coverage, identify low-coverage regions, and assess overall data quality.


Usage

samtools depth [options] input.bam

The input file can be in:

  • SAM format
  • BAM format
  • CRAM format

Output Format

The output contains three columns:

Column Description
1 Reference Sequence Name
2 Position
3 Read Depth

Example Output

chr1    100    30
chr1    101    31
chr1    102    32
chr1    103    29
...

This indicates:

  • Position 100 → Depth 30
  • Position 101 → Depth 31
  • Position 102 → Depth 32

Applications

  • Coverage analysis
  • Variant calling quality assessment
  • Whole-genome sequencing QC
  • Targeted sequencing validation
  • Copy number variation studies

Suggested Reading

Samtools Depth Documentation


Citation

Li H., Handsaker B., Wysoker A., et al. (2009). The Sequence Alignment/Map format and SAMtools. Bioinformatics, 25(16), 2078–2079.

DOI: 10.1093/bioinformatics/btp352