<p>I am assuming you are using the non-SPARK version of the method. To specify the number of threads you wish to use with HaplotypeCaller, include <code>--native-pair-hmm-threads</code> (<a href="https://software.broadinstitute.org/gatk/documentation/tooldocs/current/org_broadinstitute_hellbender_tools_walkers_haplotypecaller_HaplotypeCaller.php" rel="nofollow noreferrer">documentation</a>). This will only parallelize the pair hidden Markov models (pair HMM) process. This is an argument for the method HaplotypeCaller itself, so it should be located after the method is called as opposed to one of the <code>--java-options</code>.</p>

<p>I do recommend trying out the SPARK implementations of the GATK tools. The whole method will take advantage of the threads you specify. I've been running SPARK locally (i.e. not on Firecloud) on computational servers. I've been impressed with the enhanced performance.</p>

CC BY-SA 4.0
2018-07-03T18:00:14.847Z
I used this command now `gatk HaplotypeCaller --native-pair-hmm-threads 28  -I Read_groups_added.bam -R wheat_ref.fa -O final.vcf` but it took same time and also I specified 28 threads and 28 was shown in requested threads but system monitor was showing only 3 ~ 4 threads are used as shown here https://imgur.com/a/JJJYmB7.
Ammar Sabir Cheema
CC BY-SA 4.0
2018-07-02T18:59:21.993Z
2018-07-02T18:59:21.993Z
Kohl Kinning
<p>I am using GATK version 4.0, I tried to use multiple threads for calling variants using HaplotypeCaller using following command </p>

<pre><code>gatk --java-options -Xmx90G  -nt 28 HaplotypeCaller -I output.bam -R wheat_ref.fa -O final.vcf
</code></pre>

<p>and the error is</p>

<pre><code>'-nt' is not a valid command
</code></pre>

<p>I have also used <strong>--num_threads</strong> but again the error was the same, as written <a href="https://gatkforums.broadinstitute.org/gatk/discussion/1975/how-can-i-use-parallelism-to-make-gatk-tools-run-faster" rel="nofollow noreferrer">here</a> this parameter is available in previous versions of GATK but I don't know what's its status in current version of GATK i.e GATK 4.0. Whether it is deprecated or replaced by some other parameter? </p>

<p>Is there any way of calling multiple threads for variant calling with GATK 4.0?</p>

<phylogenetics><variant-calling><gatk>
Increase number of threads for GATK 4.0 HaplotypeCaller
# Increase number of threads for GATK 4.0 HaplotypeCaller

(Asked by: username_0 on 2018-07-02)

I am using GATK version 4.0, I tried to use multiple threads for calling variants using HaplotypeCaller using following command 
gatk --java-options -Xmx90G  -nt 28 HaplotypeCaller -I output.bam -R wheat_ref.fa -O final.vcf

and the error is
'-nt' is not a valid command

I have also used --num_threads but again the error was the same, as written here this parameter is available in previous versions of GATK but I don't know what's its status in current version of GATK i.e GATK 4.0. Whether it is deprecated or replaced by some other parameter? 
Is there any way of calling multiple threads for variant calling with GATK 4.0?

**Tags:** phylogenetics, variant-calling, gatk

---

## 1 answers

### Answer by username_1 on 2018-07-02. Score: 3 | Accepted answer

I am assuming you are using the non-SPARK version of the method. To specify the number of threads you wish to use with HaplotypeCaller, include `--native-pair-hmm-threads` ([documentation](https://software.broadinstitute.org/gatk/documentation/tooldocs/current/org_broadinstitute_hellbender_tools_walkers_haplotypecaller_HaplotypeCaller.php)). This will only parallelize the pair hidden Markov models (pair HMM) process. This is an argument for the method HaplotypeCaller itself, so it should be located after the method is called as opposed to one of the `--java-options`.

I do recommend trying out the SPARK implementations of the GATK tools. The whole method will take advantage of the threads you specify. I've been running SPARK locally (i.e. not on Firecloud) on computational servers. I've been impressed with the enhanced performance.

> **Comments:**
> **username_0**: I used this command now `gatk HaplotypeCaller --native-pair-hmm-threads 28  -I Read_groups_added.bam -R wheat_ref.fa -O final.vcf` but it took same time and also I specified 28 threads and 28 was shown in requested threads but system monitor was showing only 3 ~ 4 threads are used as shown here https://imgur.com/a/JJJYmB7.  

---

