We've moved!
This site is now read-only. You can find our new documentation site and support forum for posting questions here.
Be sure to read our welcome blog!

Null Pointer Exception in SplitSamFile

I am getting a null pointer when I try and run SplitSamFile with 3.3 (I didn't have this problem in earlier versions). It looks like SAMFileWriterStub is initialized with outputTracker as null, and then register isn't called before addAllignment, so outputTracker.getStorage(this).addAlignment(workingRead) fails.

Am I calling it in a way that is no longer supported or some such?

/opt/java/jdk1.7.0_25/bin/java -Xms256m -Xmx10g -XX:-UseGCOverheadLimit -Djava.io.tmpdir=/scratch/gabow/ -jar ~/GenomeAnalysisTK.jar -T SplitSamFile -R /ifs/data/bio/assemblies/H.sapiens/hg19/hg19.fasta -I testing/tempbams/Proj_4495.omega_group_1_CHR3_indelRealigned.bam

produces the following stack trace:

ERROR ------------------------------------------------------------------------------------------
ERROR stack trace

java.lang.NullPointerException
at org.broadinstitute.gatk.engine.io.stubs.SAMFileWriterStub.addAlignment(SAMFileWriterStub.java:325)
at org.broadinstitute.gatk.tools.walkers.readutils.SplitSamFile.reduce(SplitSamFile.java:129)
at org.broadinstitute.gatk.tools.walkers.readutils.SplitSamFile.reduce(SplitSamFile.java:55)
at org.broadinstitute.gatk.engine.traversals.TraverseReadsNano$TraverseReadsReduce.apply(TraverseReadsNano.java:251)
at org.broadinstitute.gatk.engine.traversals.TraverseReadsNano$TraverseReadsReduce.apply(TraverseReadsNano.java:240)
at org.broadinstitute.gatk.utils.nanoScheduler.NanoScheduler.executeSingleThreaded(NanoScheduler.java:279)
at org.broadinstitute.gatk.utils.nanoScheduler.NanoScheduler.execute(NanoScheduler.java:245)
at org.broadinstitute.gatk.engine.traversals.TraverseReadsNano.traverse(TraverseReadsNano.java:102)
at org.broadinstitute.gatk.engine.traversals.TraverseReadsNano.traverse(TraverseReadsNano.java:56)
at org.broadinstitute.gatk.engine.executive.LinearMicroScheduler.execute(LinearMicroScheduler.java:108)
at org.broadinstitute.gatk.engine.GenomeAnalysisEngine.execute(GenomeAnalysisEngine.java:319)
at org.broadinstitute.gatk.engine.CommandLineExecutable.execute(CommandLineExecutable.java:121)
at org.broadinstitute.gatk.utils.commandline.CommandLineProgram.start(CommandLineProgram.java:248)
at org.broadinstitute.gatk.utils.commandline.CommandLineProgram.start(CommandLineProgram.java:155)
at org.broadinstitute.gatk.engine.CommandLineGATK.main(CommandLineGATK.java:107)

#

Best Answer

Answers

Sign In or Register to comment.