> 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.

# haplotypecaller

Run a GPU-accelerated haplotypecaller.

This tool applies an accelerated GATK CollectMultipleMetrics for assessing the
metrics of a BAM file, such as including alignment success, quality score distributions,
GC bias, and sequencing artifacts. This functions as a ‘meta-metrics’ tool, and can run
any combination of the available metrics tools in GATK to assess overall
how well a sequencing run has performed. The available metrics
tools (PROGRAMs) can be found in the command line example below.

You can provide an optional BQSR report to fix the BAM, similar to
ApplyBQSR. In this case, the updated base qualities will be used.

![](/clara/parabricks/_files/parabricks-clara.docs.buildwithfern.com/e5b513f82eee37f6054b72e62773f39b4e68f85c372053e9071e3907e93ab520/assets/images/parabricks-web-graphics-1259949-r2-haplotypecaller.svg)

Refer to the [haplotypecaller 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 haplotypecaller \
    --ref /workdir/${REFERENCE_FILE} \
    --in-bam /workdir/${INPUT_BAM_FILE} \
    --in-recal-file /workdir/${INPUT_RECAL_FILE} \
    --out-variants /outputdir/${OUTPUT_VCF_FILE}
```

## Compatible GATK4 Command

The commands below are the GATK4 counterpart of the Parabricks command above. The output
from these commands will be identical to the output from the above command. Refer to the
[Output Comparison](/about-parabricks/comparison-with-baseline-tools) page for comparing the results.

```sh
# Run ApplyBQSR Step
$ gatk ApplyBQSR \
    --java-options -Xmx30g \
    -R Ref/Homo_sapiens_assembly38.fasta \
    -I mark_dups_cpu.bam \
    --bqsr-recal-file recal_file.txt \
    -O cpu_nodups_BQSR.bam

#Run Haplotype Caller
$ gatk HaplotypeCaller \
    --java-options -Xmx30g \
    --input cpu_nodups_BQSR.bam \
    --output result_cpu.vcf \
    --reference Ref/Homo_sapiens_assembly38.fasta \
    --native-pair-hmm-threads 16
```

## Source of Mismatches

While the Parabricks HaplotypeCaller does not lose any accuracy in functionality when compared with the GATK
HaplotypeCaller there are a few implementation differences that can result in slightly different output files.

* **Random generator**

The GATK HapltoypeCaller calls the same random generator in read downsampling and **QualByDepth** annotation
computation.  The Parabricks HaplotypeCaller calls two separate random number generators to allow for parallel computing.

* **Log10 implementation**

The `log10` operation is used to compute the haplotype penalty score. The Java implementation
`java.lang.Math.log10()` is slightly different from the C++ \`cmath library, giving rise to small
mismatches in computed scores.  Different haplotypes might be selected because of this.

* **AVX**

GATK calls Intel GKL (Genomics Kernel Library) which contains optimized versions of compute kernels
(e.g. Smith-Waterman, PairHMM) to run on Intel Architecture (AVX, AVX2, AVX-512, and multicore).
However, some SIMD intrinsics such as mm512\_mul\_ps\` can generate a slightly different output
when compared with the serial operations which our GPU implementation is based on.

* **HashMap, HashSet iteration**

GATK can give non-deterministic outputs because iterating over a Java `HashMap` or `HashSet` does not preserve
order.  Parabricks always gives deterministic output by using
a hash table that preserves the insertion order (similar to `LinkedHashMap` in Java).

Several original HaplotypeCaller options are supported by Parabricks.
To specify the inclusion or exclusion of several haplotype caller annotations,
use the `--haplotypecaller-options` option:

```sh
$ |sample_docker_cmd|
     --workdir /workdir \
     |docker_image| \
     pbrun haplotypecaller \
      ...
      --haplotypecaller-options '-min-pruning 4 -A AS_BaseQualityRankSumTest -A TandemRepeat'
      ...
```

Annotations may be excluded in the same manner using the `-AX` option. There should
be a space between the `-A`/`-AX` flag and its value.

The following are supported options and their allowed values:

* -A
  * AS\_BaseQualityRankSumTest
  * AS\_FisherStrand
  * AS\_InbreedingCoeff
  * AS\_MappingQualityRankSumTest
  * AS\_QualByDepth
  * AS\_RMSMappingQuality
  * AS\_ReadPosRankSumTest
  * AS\_StrandOddsRatio
  * AssemblyComplexity
  * BaseQualityRankSumTest
  * ChromosomeCounts
  * ClippingRankSumTest
  * Coverage
  * DepthPerAlleleBySample
  * DepthPerSampleHC
  * ExcessHet
  * FisherStrand
  * InbreedingCoeff
  * MappingQualityRankSumTest
  * QualByDepth
  * RMSMappingQuality
  * ReadPosRankSumTest
  * ReferenceBases
  * StrandBiasBySample
  * StrandOddsRatio
  * TandemRepeat
* -AX
  * (same as for the *-A* option)
* \--output-mode
  * EMIT\_VARIANTS\_ONLY
  * EMIT\_ALL\_CONFIDENT\_SITES
  * EMIT\_ALL\_ACTIVE\_SITES
* -max-reads-per-alignment-start
  * a positive integer
* -min-dangling-branch-length
  * a positive integer
* -min-pruning
  * a positive integer
* -pcr-indel-model
  * NONE
  * HOSTILE
  * AGGRESSIVE
  * CONSERVATIVE
* -standard-min-confidence-threshold-for-calling
  * a positive integer

## Options

In the values provided to *--haplotypecaller-options* --output-mode requires two leading hyphens, while all other values take a single hyphen.