Notice:
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.
Attention:
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.

src/test/resources/org/broadinstitute/hellbender/tools/examples/ExampleReferenceWalker/example.fasta

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

```
$ gatk FastaReferenceMaker -R example.fasta -O test.out
Using GATK jar /Users/brianlandry/bto/resources/gatk/gatk-4.1.0.0/gatk-package-4.1.0.0-local.jar defined in environment variable GATK_LOCAL_JAR
Running:
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-4.1.0.0/gatk-package-4.1.0.0-local.jar 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-4.1.0.0/gatk-package-4.1.0.0-local.jar!/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] org.broadinstitute.hellbender.tools.walkers.fasta.FastaReferenceMaker done. Elapsed time: 0.03 minutes.
Runtime.totalMemory()=373293056
java.lang.NullPointerException
at org.broadinstitute.hellbender.tools.walkers.fasta.FastaReferenceMaker.closeTool(FastaReferenceMaker.java:137)
at org.broadinstitute.hellbender.engine.GATKTool.doWork(GATKTool.java:970)
at org.broadinstitute.hellbender.cmdline.CommandLineProgram.runTool(CommandLineProgram.java:138)
at org.broadinstitute.hellbender.cmdline.CommandLineProgram.instanceMainPostParseArgs(CommandLineProgram.java:191)
at org.broadinstitute.hellbender.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:210)
at org.broadinstitute.hellbender.Main.runCommandLineProgram(Main.java:162)
at org.broadinstitute.hellbender.Main.mainEntry(Main.java:205)
at org.broadinstitute.hellbender.Main.main(Main.java:291)
```

Answers

  • 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: https://software.broadinstitute.org/gatk/guide/article?id=1894

    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 (20190802_brian.zip).

    The included example fasta file I am using I found at:

    github.com/broadinstitute/gatk/blob/master/src/test/resources/org/broadinstitute/hellbender/tools/examples/ExampleReferenceWalker/example.fasta
  • 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 (20190804_brian.zip).

    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.