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.
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.
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!
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 for a Broad Institute event from Dec 10th to Dec 11th 2019. We will be back to monitor the GATK forum on Dec 12th 2019. In the meantime we encourage you to help out other community members with their queries.
Thank you for your patience!
We will be out of the office for a Broad Institute event from Dec 10th to Dec 11th 2019. We will be back to monitor the GATK forum on Dec 12th 2019. In the meantime we encourage you to help out other community members with their queries.
Thank you for your patience!
java.lang.NullPointerException for Picard SamToFastq OUTPUT_PER_RG=T on bam without read groups

Hello,
When running Picard's SamToFastq
with OUTPUT_PER_RG=T
on a bam file without read group information, you get the following error:
Exception in thread "main" java.lang.NullPointerException at net.sf.picard.sam.SamToFastq.doWork(SamToFastq.java:148) at net.sf.picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:177) at net.sf.picard.sam.SamToFastq.main(SamToFastq.java:119)
Obviously the command shouldn't work if there is no read group information, but it would be nice if there was a more informative error provided, as the NullPointerException
makes it seem like an issue with memory allocation.
Tagged:
Comments
I.e., a check for read groups and a warning/error message if there are none and
OUTPUT_PER_RG
was set to true.@hgibling
Hi,
I totally understand the frustration. Let me put in a request to have the error message be more informative.
Thanks,
Sheila
Thank you, Sheila. I appreciate it.
Greetings @hgibling:
You are correct that many of the error messages produced by GATK and Picard are not very informative. We are in the process of trying to provide as much information as we can for error messages. However, often the amount of information that can be output on the command line is limited due to a number of reasons which are largely technical. We will inform our software development group regarding this issue and request that additional documentation be added to the command line.
@hgibling: We also strongly recommend using ValidateSamFile prior to using Picard or GATK.
Understandable, @dekling. And good advice on using
ValidateSamFile
.Bug reported to Picard here. Don't hold your breath though -- this is unlikely to be prioritized.
NullPointerException is a RuntimeException . Runtime exceptions are critical and cannot be caught at compile time. They crash the program at run time if they are not handled properly. When a class is instantiated, its object is stored in computer memory. The NullPointerExceptions occur when you try to use a reference that points to no location in memory (null) as though it were referencing an object. More about....NullPointerException
http://net-informations.com/java/cjava/null.htm
Anto
@hgibling An informative error message was added to this tool. This will be available in the next release (or you can get it by building the jar from source yourself).