Heads up:
We’re moving the GATK website, docs and forum to a new platform. Read the full story and breakdown of key changes on this blog.
If you happen to see a question you know the answer to, please do chime in and help your fellow community members. We encourage our fourm members to be more involved, jump in and help out your fellow researchers with their questions. GATK forum is a community forum and helping each other with using GATK tools and research is the cornerstone of our success as a genomics research community.We appreciate your help!

Test-drive the GATK tools and Best Practices pipelines on Terra

Check out this blog post to learn how you can get started with GATK and try out the pipelines in preconfigured workspaces (with a user-friendly interface!) without having to install anything.

GATK - Exit Code 3

Hi! Thank you so much for taking the time to read this question. I am currently using GATK v to CombineGVCFs
and when I run the program, I get an output file, but I also get Exit Code 3. In all the other GATK commands that I have ran successfully I get Exit Code 0 instead of 3. Furthermore, when using VariantFiltration on the output file of my CombineGVCFs command, I realized that somehow my variant "variant_MUI047" is gone out of the list of individuals I am working with. Please kindly see below my command line for GATK CombineGVCFs:

echo "Starting run at: `date`"
gatk CombineGVCFs \
-R tubesnoutV2.2_chr1-23_and_UN.fasta \
--variant variant_MUI004.vcf \
--variant variant_MUI006.vcf \
--variant variant_MUI009.vcf \
--variant variant_MUI010.vcf \
--variant variant_MUI014.vcf \
--variant variant_MUI017.vcf \
--variant variant_MUI024.vcf \
--variant variant_MUI025.vcf \
--variant variant_MUI027.vcf \
--variant variant_MUI028.vcf \
--variant variant_MUI029.vcf \
--variant variant_MUI030.vcf \
--variant variant_MUI032.vcf \
--variant variant_MUI035.vcf \
--variant variant_MUI036.vcf \
--variant variant_MUI037.vcf \
--variant variant_MUI038.vcf \
--variant variant_MUI039.vcf \
--variant variant_MUI040.vcf \
--variant variant_MUI041.vcf \
--variant variant_MUI044.vcf \
--variant variant_MUI045.vcf \
--variant variant_MUI047.vcf \
--variant variant_MUI051.vcf \
--variant variant_MUI052.vcf \
--variant variant_MUI057.vcf \
--variant variant_MUI063.vcf \
--variant variant_MUI066.vcf \
--variant variant_MUI067.vcf \
--variant variant_MUI068.vcf \
--variant variant_MUI071.vcf \
--variant variant_MUI072.vcf \
--variant variant_MUI073.vcf \
--variant variant_MUI074.vcf \
--variant variant_MUI076.vcf \
--variant variant_MUI077.vcf \
--variant variant_MUI079.vcf \
--variant variant_MUI080.vcf \
--variant variant_MUI081.vcf \
--variant variant_MUI083.vcf \
-O all_variants_MUIsamples_tubesnout_alignment.vcf \

As mentioned before, this command produces the "all_variants_MUIsamples_tubesnout_alignment.vcf" file, but it also comes with an EXIT CODE 3. What I would like to understand is:

- What is the meaning of Exit Code 3?
- Is there a problem in the way I am writing my CombineGVCFs command line?
-Could this be related in anyway with the disappearance of individual MUI047 observed after using VariantFiltration on the combined file (VariantFiltration ran with an exitcode 0)

Again, Thank you so much for taking the time to read this. And beforehand, I appreciate your help in this regard


  • cnormancnorman United StatesMember, Broadie, Dev ✭✭

    @mlope921 Can you include the log/command line output you get from running the (CombineGVCFs) command that fails ? Thanks.

  • mlope921mlope921 Member
    Hi cnorman!Thank you for your reply, since I last posted my comment, I was able to figure out what was wrong on my command and now I get an exit code 0. However, I would still like to know what Exit Code 3 means. Thanks :)
  • cnormancnorman United StatesMember, Broadie, Dev ✭✭

    @mlope921 I don't see an obvious code path that returns -3, so I'd need to see the command line output to determine what happened (there should be some indication in the output of the error that occurred).

  • mfranklinmfranklin Member
    @mlope921 What was wrong with your command? I'm getting exit code 3, but also have output files and a log that says it's completed but with the error:

    htsjdk.samtools.util.RuntimeIOException: /cromwell-executions/WgGermline/23d9cf27-9d50-418d-9bb1-8e3b9122d97c/call-processBamFiles/processbamfiles/53602fa8-459c-44c0-b8c1-ddbe391aa7c1/call-mergeSamFiles/inputs/700685144/generated-80d4067a-a206-11e9-bf7f-acde48001122.bam has invalid uncompressedLength: -2444880


    gatk MergeSamFiles \
    -I /cromwell-executions/WgGermline/23d9cf27-9d50-418d-9bb1-8e3b9122d97c/call-processBamFiles/processbamfiles/53602fa8-459c-44c0-b8c1-ddbe391aa7c1/call-mergeSamFiles/inputs/700685144/generated-80d4067a-a206-11e9-bf7f-acde48001122.bam \
    -O generated-80d464b2-a206-11e9-bf7f-acde48001122.bam \
    --MAX_RECORDS_IN_RAM 5000000 \
    --TMP_DIR /tmp/ \


    Picked up _JAVA_OPTIONS: -Djava.io.tmpdir=/cromwell-executions/WgGermline/23d9cf27-9d50-418d-9bb1-8e3b9122d97c/call-processBamFiles/processbamfiles/53602fa8-459c-44c0-b8c1-ddbe391aa7c1/call-mergeSamFiles/tmp.bceeb4e8
    20:29:14.804 INFO NativeLibraryLoader - Loading libgkl_compression.so from jar:file:/gatk/gatk-package-!/com/intel/gkl/native/libgkl_compression.so
    [Tue Jul 09 20:29:14 UTC 2019] MergeSamFiles --INPUT /cromwell-executions/WgGermline/23d9cf27-9d50-418d-9bb1-8e3b9122d97c/call-processBamFiles/processbamfiles/53602fa8-459c-44c0-b8c1-ddbe391aa7c1/call-mergeSamFiles/inputs/700685144/generated-80d4067a-a206-11e9-bf7f-acde48001122.bam --OUTPUT generated-80d464b2-a206-11e9-bf7f-acde48001122.bam --USE_THREADING true --TMP_DIR /tmp --VALIDATION_STRINGENCY SILENT --MAX_RECORDS_IN_RAM 5000000 --CREATE_INDEX true --SORT_ORDER coordinate --ASSUME_SORTED false --MERGE_SEQUENCE_DICTIONARIES false --VERBOSITY INFO --QUIET false --COMPRESSION_LEVEL 2 --CREATE_MD5_FILE false --GA4GH_CLIENT_SECRETS client_secrets.json --help false --version false --showHidden false --USE_JDK_DEFLATER false --USE_JDK_INFLATER false
    [Tue Jul 09 20:30:15 UTC 2019] Executing as [email protected] on Linux 3.10.0-957.10.1.el7.x86_64 amd64; OpenJDK 64-Bit Server VM 1.8.0_181-8u181-b13-0ubuntu0.16.04.1-b13; Deflater: Intel; Inflater: Intel; Provider GCS is available; Picard version: Version:
    INFO 2019-07-09 20:30:15 MergeSamFiles Input files are in same order as output so sorting to temp directory is not needed.
    INFO 2019-07-09 20:30:23 MergeSamFiles Processed 1,000,000 records. Elapsed time: 00:00:07s. Time for last 1,000,000: 7s. Last read position: 1:1,527,139
    # More Processed records between 1-278 million
    INFO 2019-07-09 21:17:04 MergeSamFiles Processed 278,000,000 records. Elapsed time: 00:46:48s. Time for last 1,000,000: 12s. Last read position: 2:32,916,363
    [Tue Jul 09 21:17:06 UTC 2019] picard.sam.MergeSamFiles done. Elapsed time: 47.86 minutes.
    To get help, see <help link that I can't post to GATK forum>
    htsjdk.samtools.util.RuntimeIOException: /cromwell-executions/WgGermline/23d9cf27-9d50-418d-9bb1-8e3b9122d97c/call-processBamFiles/processbamfiles/53602fa8-459c-44c0-b8c1-ddbe391aa7c1/call-mergeSamFiles/inputs/700685144/generated-80d4067a-a206-11e9-bf7f-acde48001122.bam has invalid uncompressedLength: -2444880
    at htsjdk.samtools.util.BlockCompressedInputStream.inflateBlock(BlockCompressedInputStream.java:543)
    at htsjdk.samtools.util.BlockCompressedInputStream.processNextBlock(BlockCompressedInputStream.java:532)
    at htsjdk.samtools.util.BlockCompressedInputStream.nextBlock(BlockCompressedInputStream.java:468)
    at htsjdk.samtools.util.BlockCompressedInputStream.readBlock(BlockCompressedInputStream.java:458)
    at htsjdk.samtools.util.BlockCompressedInputStream.available(BlockCompressedInputStream.java:196)
    at htsjdk.samtools.util.BlockCompressedInputStream.read(BlockCompressedInputStream.java:331)
    at java.io.DataInputStream.read(DataInputStream.java:149)
    at htsjdk.samtools.util.BinaryCodec.readBytesOrFewer(BinaryCodec.java:421)
    at htsjdk.samtools.util.BinaryCodec.readBytes(BinaryCodec.java:394)
    at htsjdk.samtools.util.BinaryCodec.readBytes(BinaryCodec.java:380)
    at htsjdk.samtools.BAMRecordCodec.decode(BAMRecordCodec.java:268)
    at htsjdk.samtools.BAMFileReader$BAMFileIterator.getNextRecord(BAMFileReader.java:829)
    at htsjdk.samtools.BAMFileReader$BAMFileIterator.advance(BAMFileReader.java:803)
    at htsjdk.samtools.BAMFileReader$BAMFileIterator.next(BAMFileReader.java:797)
    at htsjdk.samtools.BAMFileReader$BAMFileIterator.next(BAMFileReader.java:765)
    at htsjdk.samtools.SamReader$AssertingIterator.next(SamReader.java:569)
    at htsjdk.samtools.SamReader$AssertingIterator.next(SamReader.java:548)
    at htsjdk.samtools.util.PeekableIterator.advance(PeekableIterator.java:71)
    at htsjdk.samtools.util.PeekableIterator.next(PeekableIterator.java:57)
    at htsjdk.samtools.MergingSamRecordIterator.next(MergingSamRecordIterator.java:130)
    at picard.sam.MergeSamFiles.doWork(MergeSamFiles.java:223)
    at picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:295)
    at org.broadinstitute.hellbender.cmdline.PicardCommandLineProgramExecutor.instanceMain(PicardCommandLineProgramExecutor.java:25)
    at org.broadinstitute.hellbender.Main.runCommandLineProgram(Main.java:160)
    at org.broadinstitute.hellbender.Main.mainEntry(Main.java:203)
    at org.broadinstitute.hellbender.Main.main(Main.java:289)
    Using GATK jar /gatk/gatk-package-
    java -Dsamjdk.use_async_io_read_samtools=false -Dsamjdk.use_async_io_write_samtools=true -Dsamjdk.use_async_io_write_tribble=false -Dsamjdk.compression_level=2 -jar /gatk/gatk-package- MergeSamFiles --USE_THREADING -I /cromwell-executions/WgGermline/23d9cf27-9d50-418d-9bb1-8e3b9122d97c/call-processBamFiles/processbamfiles/53602fa8-459c-44c0-b8c1-ddbe391aa7c1/call-mergeSamFiles/inputs/700685144/generated-80d4067a-a206-11e9-bf7f-acde48001122.bam -O generated-80d464b2-a206-11e9-bf7f-acde48001122.bam --CREATE_INDEX --MAX_RECORDS_IN_RAM 5000000 --TMP_DIR /tmp/ --VALIDATION_STRINGENCY SILENT


    (I can't seem to use Markdown or _any_ **formatting** when replying?)
Sign In or Register to comment.