Skip to content

[sambamba depth] documentation

Stathis edited this page Oct 17, 2018 · 1 revision

NAME

sambamba-depth - depth statistics for BAM data

SYNOPSIS

sambamba-depth region|window|base [options] input.bam [input2.bam [...]]

DESCRIPTION

sambamba-depth requires bams to be coordinate-sorted and indexed.

The tool has three modes: base, region, and window, each name means per which unit to print the statistics.

OPTIONS

-F, --filter=FILTER
set custom filter for alignments; the default value is 'mapping_quality > 0 and not duplicate and not failed_quality_control'
-o, --output-file=FILENAME
output filename (by default /dev/stdout)
-t, --nthreads=NTHREADS
maximum number of threads to use
-c, --min-coverage=MINCOVERAGE
minimum mean coverage for output (default: 0 for region/window, 1 for base)
-C, --max-coverage=MAXCOVERAGE
maximum mean coverage for output
-q, --min-base-quality=QUAL
don't count bases with lower base quality
--combined
output combined statistics for all samples
-a, --annotate
add additional column of y/n instead of skipping records not satisfying the criteria
-m, --fix-mate-overlaps
detect overlaps of mate reads and handle them on per-base basis

EXAMPLES

Get average depth in bam per bed region

$ sambamba-depth region -L example.bed example.bam

Will output something like this:


# chrom chromStart      chromEnd        readCount       meanCoverage    sampleName
chr1    157869455       158026560       27562   23.6111 sample1
...
chr22   8901514 9101488 48617   32.9561 sample1