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?


1 Answer 1


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

  • $\begingroup$ 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 imgur.com/a/JJJYmB7. $\endgroup$ Commented Jul 3, 2018 at 18:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.