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

# somatic (Somatic Variant Caller)

Run a somatic variant workflow.

The somatic tool processes the tumor FASTQ files, and optionally normal FASTQ files
and knownSites files, and generates tumor or tumor/normal analysis. The output is in VCF format.

Internally the somatic tool runs several other Parabricks tools, thereby simplifying your work flow.

![](/clara/parabricks/_files/parabricks-clara.docs.buildwithfern.com/93b7bdad7f354af9983c729929a79b8a6c203290b53d0e680efc7e54edcfd099/assets/images/somatic.png)

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

## Quick Start

```sh
# The command line below will run tumor-only analysis.
# 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 somatic \
    --ref /workdir/${REFERENCE_FILE} \
    --in-tumor-fq /workdir/${INPUT_FASTQ_1} /workdir/${INPUT_FASTQ_2} \
    --bwa-options="-Y" \
    --out-vcf /outputdir/${OUTPUT_VCF} \
    --out-tumor-bam /outputdir/${OUTPUT_BAM}

# The command line below will run tumor-normal analysis.
# 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 somatic \
    --ref /workdir/${REFERENCE_FILE} \
    --knownSites /workdir/${KNOWN_SITES_FILE} \
    --in-tumor-fq /workdir/${INPUT_TUMOR_FASTQ_1} /workdir/${INPUT_TUMOR_FASTQ_2} "@RG\tID:sm_tumor_rg1\tLB:lib1\tPL:bar\tSM:sm_tumor\tPU:sm_tumor_rg1" \
    --bwa-options="-Y" \
    --out-vcf /outputdir/${OUTPUT_VCF} \
    --out-tumor-bam /outputdir/${OUTPUT_TUMOR_BAM} \
    --out-tumor-recal-file /outputdir/${OUTPUT_RECAL_FILE} \
    --in-normal-fq /workdir/${INPUT_NORMAL_FASTQ_1} /workdir/${INPUT_NORMAL_FASTQ_2} "@RG\tID:sm_normal_rg1\tLB:lib1\tPL:bar\tSM:sm_normal\tPU:sm_normal_rg1" \
    --out-normal-bam /outputdir/${OUTPUT_NORMAL_BAM}
```

## Compatible CPU Command

```bash
# The commands below will run tumor-normal analysis.
#
# Run bwa mem on the tumor FASTQ files then sort the BAM by coordinates.
$ bwa mem \
    -t 32 \
    -K 10000000 \
    -Y \
    -R '@RG\tID:sample_rg1\tLB:lib1\tPL:bar\tSM:sample\tPU:sample_rg1' \
    ${REFERENCE_FILE} ${TUMOR_FASTQ_1} ${TUMOR_FASTQ_2} | \
  gatk SortSam \
    --java-options -Xmx30g \
    --MAX_RECORDS_IN_RAM 5000000 \
    -I /dev/stdin \
    -O tumor_cpu.bam \
    --SORT_ORDER coordinate

# Mark duplicates.
$ gatk MarkDuplicates \
    --java-options -Xmx30g \
    -I tumor_cpu.bam \
    -O tumor_mark_dups_cpu.bam \
    -M tumor_metrics.txt

# Generate a BQSR report.
$ gatk BaseRecalibrator \
    --java-options -Xmx30g \
    --input tumor_mark_dups_cpu.bam \
    --output ${OUTPUT_TUMOR_RECAL_FILE} \
    --known-sites ${KNOWN_SITES_FILE} \
    --reference ${REFERENCE_FILE}

# Apply the BQSR report.
$ gatk ApplyBQSR \
    --java-options -Xmx30g \
    -R ${REFERENCE_FILE} \
    -I tumor_cpu.bam \
    --bqsr-recal-file ${TUMOR_OUTPUT_RECAL_FILE} \
    -O ${OUTPUT_TUMOR_BAM}

# Now repeat all the above steps, only with the normal FASTQ data.
$ bwa mem \
    -t 32 \
    -K 10000000 \
    -Y \
    -R '@RG\tID:sample_rg1\tLB:lib1\tPL:bar\tSM:sample\tPU:sample_rg1' \
    ${REFERENCE_FILE} ${NORMAL_FASTQ_1} ${NORMAL_FASTQ_2} | \
  gatk SortSam \
    --java-options -Xmx30g \
    --MAX_RECORDS_IN_RAM 5000000 \
    -I /dev/stdin \
    -O normal_cpu.bam \
    --SORT_ORDER coordinate

# Mark duplicates.
$ gatk MarkDuplicates \
    --java-options -Xmx30g \
    -I normal_cpu.bam \
    -O normal_mark_dups_cpu.bam \
    -M normal_metrics.txt

# Generate a BQSR report.
$ gatk BaseRecalibrator \
    --java-options -Xmx30g \
    --input normal_mark_dups_cpu.bam \
    --output ${OUTPUT_NORMAL_RECAL_FILE} \
    --known-sites ${KNOWN_SITES_FILE} \
    --reference ${REFERENCE_FILE}

# Apply the BQSR report.
$ gatk ApplyBQSR \
    --java-options -Xmx30g \
    -R ${REFERENCE_FILE} \
    -I normal_cpu.bam \
    --bqsr-recal-file ${OUTPUT_NORMAL_RECAL_FILE} \
    -O ${OUTPUT_NORMAL_BAM}

# Finally, run Mutect2 on the normal and tumor data.
$ gatk Mutect2 \
    -R ${REFERENCE_FILE} \
    --input ${OUTPUT_TUMOR_BAM} \
    --tumor-sample tumor \
    --input ${OUTPUT_NORMAL_BAM} \
    --normal-sample normal \
    --output ${OUTPUT_VCF}
```

## Options