> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/clara/parabricks/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/clara/parabricks/_mcp/server.

# bammetrics

Accelerated GATK4 CollectWGSMetrics.

This tool applies an accelerated version of the GATK CollectWGSMetrics for assessing
coverage and quality of an aligned whole-genome BAM file. This includes metrics
such as the fraction of reads that pass the base and mapping quality filters,
and the coverage levels (read-depth) across the genome. These act as an overall
quality check for the user, allowing assessment of how well a sequencing run
has performed.

Refer to the [bammetrics Reference](#options) section for a detailed listing of all available options.

## Quick Start

```sh
# This command assumes all the inputs are in the current working directory and all the outputs go to the same place.
docker run --rm --gpus all --volume $(pwd):/workdir --volume $(pwd):/outputdir \
    --workdir /workdir \
    nvcr.io/nvidia/clara/clara-parabricks:4.7.1-1 \
    pbrun bammetrics \
    --ref /workdir/${REFERENCE_FILE} \
    --bam /workdir/${INPUT_BAM} \
    --out-metrics-file /outputdir/${METRICS_FILE}
```

## Compatible GATK4 Command

The command below is the GATK4 counterpart of the Parabricks command above. The output
from this command will be identical to the output from the above command.

```sh
$ gatk CollectWgsMetrics \
    -R <INPUT_DIR>/${REFERENCE_FILE} \
    -I <INPUT_DIR>/${INPUT_BAM} \
    -O <OUTPUT_DIR>/${METRICS_FILE}
```

## Options