Contents
- Java command basics
- Using the gatk wrapper script (recommended)
- Adding GATK arguments
- Adding Java arguments
- Adding Spark arguments
- Examples of real commands
1. Java command basics
GATK follows the basic Java command-line syntax:
java -jar program.jar [program arguments]
The core of the command is java -jar program.jar, which starts up the program in a Java Virtual Machine (JVM).
2. Using the gatk wrapper script (recommended)
We provide a launch script that encapsulates the java -jar program.jar part of the command in a single invocation, gatk. There are several reasons for this that we don’t go into in this article (including that there are now two jars included in the package you download), but the upshot is that it makes it possible to add GATK to your PATH variable, and it allows us to build in some autocomplete functionality for convenience.
So the basic command is now:
gatk [program arguments]
3. Adding GATK arguments
The only universally required argument is the name of the GATK tool you want to run. It is a positional argument, so you specify it directly after the