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.
We will be out of the office on October 14, 2019, due to the U.S. holiday. We will return to monitoring the forum on October 15.

NullPointerException in FastaReferenceMaker.closeTool

I want to use FastaAlternateReferenceMaker, however, it is giving me null pointer exception in FastaReferenceMaker.closeTool. To isolate the problem I replicated the same error by running the simpler `gatk FastaReferenceMaker -R example.fasta -O test.out` where example.fasta is from the GATK test folder and it is accompanied by the .dict in the same folder.


Unfortunately, the error doesn't really tell me much, could someone point me in the right direction to fixing this issue? Thanks

I am running GATK

$ gatk FastaReferenceMaker -R example.fasta -O test.out
Using GATK jar /Users/brianlandry/bto/resources/gatk/gatk- defined in environment variable GATK_LOCAL_JAR
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 /Users/brianlandry/bto/resources/gatk/gatk- FastaReferenceMaker -R example.fasta -O test.out
13:15:26.283 INFO NativeLibraryLoader - Loading libgkl_compression.dylib from jar:file:/Users/brianlandry/bto/resources/gatk/gatk-!/com/intel/gkl/native/libgkl_compression.dylib
13:15:27.972 INFO FastaReferenceMaker - ------------------------------------------------------------
13:15:27.973 INFO FastaReferenceMaker - The Genome Analysis Toolkit (GATK) v4.1.0.0
13:15:27.973 INFO FastaReferenceMaker - For support and documentation go to *EDITED TO REMOVE HYPLINK SO I COULD POST*
13:15:27.973 INFO FastaReferenceMaker - Executing as [email protected] on Mac OS X v10.14.5 x86_64
13:15:27.973 INFO FastaReferenceMaker - Java runtime: Java HotSpot(TM) 64-Bit Server VM v1.8.0_181-b13
13:15:27.974 INFO FastaReferenceMaker - Start Date/Time: July 24, 2019 1:15:26 PM PDT
13:15:27.974 INFO FastaReferenceMaker - ------------------------------------------------------------
13:15:27.974 INFO FastaReferenceMaker - ------------------------------------------------------------
13:15:27.974 INFO FastaReferenceMaker - HTSJDK Version: 2.18.2
13:15:27.974 INFO FastaReferenceMaker - Picard Version: 2.18.25
13:15:27.974 INFO FastaReferenceMaker - HTSJDK Defaults.COMPRESSION_LEVEL : 2
13:15:27.974 INFO FastaReferenceMaker - HTSJDK Defaults.USE_ASYNC_IO_READ_FOR_SAMTOOLS : false
13:15:27.974 INFO FastaReferenceMaker - HTSJDK Defaults.USE_ASYNC_IO_WRITE_FOR_SAMTOOLS : true
13:15:27.974 INFO FastaReferenceMaker - HTSJDK Defaults.USE_ASYNC_IO_WRITE_FOR_TRIBBLE : false
13:15:27.975 INFO FastaReferenceMaker - Deflater: IntelDeflater
13:15:27.975 INFO FastaReferenceMaker - Inflater: IntelInflater
13:15:27.975 INFO FastaReferenceMaker - GCS max retries/reopens: 20
13:15:27.975 INFO FastaReferenceMaker - Requester pays: disabled
13:15:27.975 INFO FastaReferenceMaker - Initializing engine
13:15:28.297 INFO FastaReferenceMaker - Done initializing engine
13:15:28.298 INFO FastaReferenceMaker - Shutting down engine
[July 24, 2019 1:15:28 PM PDT] done. Elapsed time: 0.03 minutes.
at org.broadinstitute.hellbender.engine.GATKTool.doWork(
at org.broadinstitute.hellbender.cmdline.CommandLineProgram.runTool(
at org.broadinstitute.hellbender.cmdline.CommandLineProgram.instanceMainPostParseArgs(
at org.broadinstitute.hellbender.cmdline.CommandLineProgram.instanceMain(
at org.broadinstitute.hellbender.Main.runCommandLineProgram(
at org.broadinstitute.hellbender.Main.mainEntry(
at org.broadinstitute.hellbender.Main.main(


  • bhanuGandhambhanuGandham admin Cambridge MAMember, Administrator, Broadie, Moderator admin
    edited July 29

    HI @BrianBTO

    I tried to recreate the error but my command did not error out. Can you please share you input fasta file and .dict so i can try and recreate the error. Here are instructions on sharing the data with me:

    Also please direct me to the page that provided the example.fasta file

  • BrianBTOBrianBTO Member
    Hi @bhanuGandham

    Thanks for looking into this for me!

    I've followed the directions in your link and uploaded the data to the ftp (

    The included example fasta file I am using I found at:
  • bhanuGandhambhanuGandham admin Cambridge MAMember, Administrator, Broadie, Moderator admin
    edited August 2

    Hi @BrianBTO

    I am unable to recreate this error. It seems to run just fine on my end. Try to instal the latest GATK v4.1.2.0 and let me know if the error persists.

  • BrianBTOBrianBTO Member
    I am still receiving the same result. I uploaded the data to the ftp (

    I'm not sure if this is relevant but here is what I get when I run java -version.

    09:41 $ java -version
    java version "1.8.0_181"
    Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
    Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)
  • bhanuGandhambhanuGandham admin Cambridge MAMember, Administrator, Broadie, Moderator admin

    HI @BrianBTO

    Try renaming your output to -O test.fasta instead of -O test.out. Let me know of that resolves the error.

  • BrianBTOBrianBTO Member
    That fixes it for me! Thanks for the help @bhanuGandham !
Sign In or Register to comment.