Tagged with #exception
0 documentation articles | 0 announcements | 4 forum discussions


No posts found with the requested search criteria.
No posts found with the requested search criteria.
Comments (1)

Hi there,

I've encountered a NullPointerException when running RealignerTargetCreator. I wasn't able to find any hint that that's a known problem, so I'm posting it here (sorry, should I have overlooked something).

INFO  21:41:18,635 HelpFormatter - -------------------------------------------------------------------------------- 
INFO  21:41:18,638 HelpFormatter - The Genome Analysis Toolkit (GATK) v2.8-1-g932cd3a, Compiled 2013/12/06 16:47:15 
INFO  21:41:18,638 HelpFormatter - Copyright (c) 2010 The Broad Institute 
INFO  21:41:18,638 HelpFormatter - For support and documentation go to http://www.broadinstitute.org/gatk 
INFO  21:41:18,645 HelpFormatter - Program Args: -l INFO -R hg18/hg18.fasta -I aln/hiseq.wholegenome.cov30.stampy.sorted.markdup.bam -T RealignerTargetCreator -nt 12 -o aln/hiseq.wholegenome.cov30.stampy.indels.intervals 
INFO  21:41:18,645 HelpFormatter - Date/Time: 2014/02/24 21:41:18 
INFO  21:41:18,645 HelpFormatter - -------------------------------------------------------------------------------- 
INFO  21:41:18,646 HelpFormatter - -------------------------------------------------------------------------------- 
INFO  21:41:18,733 GenomeAnalysisEngine - Strictness is SILENT 
INFO  21:41:18,842 GenomeAnalysisEngine - Downsampling Settings: Method: BY_SAMPLE, Target Coverage: 1000 
INFO  21:41:18,853 SAMDataSource$SAMReaders - Initializing SAMRecords in serial 
INFO  21:41:18,923 SAMDataSource$SAMReaders - Done initializing BAM readers: total time 0.07 
INFO  21:41:18,956 MicroScheduler - Running the GATK in parallel mode with 12 total threads, 1 CPU thread(s) for each of 12 data thread(s), of 24 processors available on this machine 
INFO  21:41:19,038 GenomeAnalysisEngine - Preparing for traversal over 1 BAM files 
INFO  21:41:19,823 GenomeAnalysisEngine - Done preparing for traversal 
INFO  21:41:19,823 ProgressMeter - [INITIALIZATION COMPLETE; STARTING PROCESSING] 
INFO  21:41:19,825 ProgressMeter -        Location processed.sites  runtime per.1M.sites completed total.runtime remaining 
INFO  21:41:19,910 SAMDataSource$SAMReaders - Initializing SAMRecords in serial 
INFO  21:41:19,916 SAMDataSource$SAMReaders - Done initializing BAM readers: total time 0.01 
INFO  21:41:19,919 SAMDataSource$SAMReaders - Initializing SAMRecords in serial 
INFO  21:41:19,928 SAMDataSource$SAMReaders - Done initializing BAM readers: total time 0.01 
INFO  21:41:19,937 SAMDataSource$SAMReaders - Initializing SAMRecords in serial 
INFO  21:41:19,944 SAMDataSource$SAMReaders - Done initializing BAM readers: total time 0.01 
INFO  21:41:19,944 SAMDataSource$SAMReaders - Initializing SAMRecords in serial 
INFO  21:41:19,951 SAMDataSource$SAMReaders - Done initializing BAM readers: total time 0.01 
INFO  21:41:19,952 SAMDataSource$SAMReaders - Initializing SAMRecords in serial 
INFO  21:41:19,958 SAMDataSource$SAMReaders - Done initializing BAM readers: total time 0.01 
INFO  21:41:19,958 SAMDataSource$SAMReaders - Initializing SAMRecords in serial 
INFO  21:41:19,964 SAMDataSource$SAMReaders - Done initializing BAM readers: total time 0.01 
INFO  21:41:19,964 SAMDataSource$SAMReaders - Initializing SAMRecords in serial 
INFO  21:41:19,975 SAMDataSource$SAMReaders - Done initializing BAM readers: total time 0.01 
INFO  21:41:19,976 SAMDataSource$SAMReaders - Initializing SAMRecords in serial 
INFO  21:41:19,980 SAMDataSource$SAMReaders - Done initializing BAM readers: total time 0.00 
INFO  21:41:19,980 SAMDataSource$SAMReaders - Initializing SAMRecords in serial 
INFO  21:41:19,984 SAMDataSource$SAMReaders - Done initializing BAM readers: total time 0.00 
INFO  21:41:19,985 SAMDataSource$SAMReaders - Initializing SAMRecords in serial 
INFO  21:41:19,989 SAMDataSource$SAMReaders - Done initializing BAM readers: total time 0.00 
INFO  21:41:19,990 SAMDataSource$SAMReaders - Initializing SAMRecords in serial 
INFO  21:41:20,010 SAMDataSource$SAMReaders - Done initializing BAM readers: total time 0.02 
INFO  21:41:49,933 ProgressMeter -   chr1:26116497        2.60e+07   30.0 s        1.0 s      0.8%        59.0 m    58.5 m 
INFO  21:42:19,937 ProgressMeter -   chr1:57885373        5.77e+07   60.0 s        1.0 s      1.9%        53.2 m    52.2 m 
INFO  21:42:49,941 ProgressMeter -   chr1:88146121        8.80e+07   90.0 s        1.0 s      2.9%        52.4 m    50.9 m 
INFO  21:43:03,098 GATKRunReport - Uploaded run statistics report to AWS S3 
##### ERROR ------------------------------------------------------------------------------------------
##### ERROR stack trace 
java.lang.NullPointerException
        at org.broadinstitute.sting.utils.locusiterator.LocusIteratorByState.getLocation(LocusIteratorByState.java:218)
        at org.broadinstitute.sting.utils.locusiterator.LocusIteratorByState.lazyLoadNextAlignmentContext(LocusIteratorByState.java:294)
        at org.broadinstitute.sting.utils.locusiterator.LocusIteratorByState.hasNext(LocusIteratorByState.java:233)
        at net.sf.picard.util.PeekableIterator.advance(PeekableIterator.java:70)
        at net.sf.picard.util.PeekableIterator.next(PeekableIterator.java:57)
        at org.broadinstitute.sting.gatk.executive.WindowMaker$WindowMakerIterator.advance(WindowMaker.java:200)
        at org.broadinstitute.sting.gatk.executive.WindowMaker$WindowMakerIterator.hasNext(WindowMaker.java:169)
        at org.broadinstitute.sting.gatk.datasources.providers.LocusView.advance(LocusView.java:180)
        at org.broadinstitute.sting.gatk.datasources.providers.LocusView.hasNextLocus(LocusView.java:148)
        at org.broadinstitute.sting.gatk.datasources.providers.AllLocusView.advance(AllLocusView.java:127)
        at org.broadinstitute.sting.gatk.datasources.providers.AllLocusView.hasNext(AllLocusView.java:85)
        at org.broadinstitute.sting.gatk.traversals.TraverseLociNano$MapDataIterator.hasNext(TraverseLociNano.java:167)
        at org.broadinstitute.sting.utils.nanoScheduler.NanoScheduler.executeSingleThreaded(NanoScheduler.java:268)
        at org.broadinstitute.sting.utils.nanoScheduler.NanoScheduler.execute(NanoScheduler.java:245)
        at org.broadinstitute.sting.gatk.traversals.TraverseLociNano.traverse(TraverseLociNano.java:144)
        at org.broadinstitute.sting.gatk.traversals.TraverseLociNano.traverse(TraverseLociNano.java:92)
        at org.broadinstitute.sting.gatk.traversals.TraverseLociNano.traverse(TraverseLociNano.java:48)
        at org.broadinstitute.sting.gatk.executive.ShardTraverser.call(ShardTraverser.java:98)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:744)
##### ERROR ------------------------------------------------------------------------------------------
##### ERROR A GATK RUNTIME ERROR has occurred (version 2.8-1-g932cd3a):
##### ERROR
##### ERROR This might be a bug. Please check the documentation guide to see if this is a known problem.
##### ERROR If not, please post the error message, with stack trace, to the GATK forum.
##### ERROR Visit our website and forum for extensive documentation and answers to 
##### ERROR commonly asked questions http://www.broadinstitute.org/gatk
##### ERROR
##### ERROR MESSAGE: Code exception (see stack trace for error itself)
##### ERROR ------------------------------------------------------------------------------------------

Please let me know if there is more information I can provide.

Best, Tobi

Comments (4)

Hello,

This is in regards to a small exome capture experiment that I'd recently talked about here: http://gatkforums.broadinstitute.org/discussion/3531/bam-index-files-from-1000g-not-recognized-other-questions#latest . There are 8 experimental BAMs and 22 BAMs from 1000G supplied as inputs to HaplotypeCaller. And it quits with a code exception error at 52.1%. I've attached the relevant output. Also attached is the input files list. My OS info is:

Linux 3.2.0-56-generic #86-Ubuntu SMP x86_64 GNU/Linux

Any help would be greatly appreciated!

Thank you, Firas

Comments (8)

When trying to run the HaplotypeCaller in 2.6.2 with -nct I'm getting a number of crashes. Is NCT currently supported or is this experimental for the HaplotypeCaller currently? With the Multithreading I'm not exactly sure where the error is occurring and it's a pretty big bam. If needed I can try to narrow it down a bit further and create a subset bam...


../jre1.7.0_25/bin/java -jar ../GenomeAnalysisTK-2.6-2-ge03a5e9/GenomeAnalysisTK.jar -R ../refs/bosTau6.lic.fa -T HaplotypeCaller -I ../Chr15.ir.bam -bamout Chr15.bam -o Chr15.vcf.gz -L Chr15 -nct 5 -rf BadCigar

##### ERROR ------------------------------------------------------------------------------------------
##### ERROR stack trace 
java.lang.NullPointerException
        at net.sf.samtools.SAMRecordCoordinateComparator.fileOrderCompare(SAMRecordCoordinateComparator.java:82)
        at net.sf.samtools.SAMRecordCoordinateComparator.compare(SAMRecordCoordinateComparator.java:43)
        at net.sf.samtools.SAMRecordCoordinateComparator.compare(SAMRecordCoordinateComparator.java:41)
        at java.util.TimSort.countRunAndMakeAscending(Unknown Source)
        at java.util.TimSort.sort(Unknown Source)
        at java.util.Arrays.sort(Unknown Source)
        at net.sf.samtools.util.SortingCollection.spillToDisk(SortingCollection.java:203)
        at net.sf.samtools.util.SortingCollection.add(SortingCollection.java:150)
        at net.sf.samtools.SAMFileWriterImpl.addAlignment(SAMFileWriterImpl.java:170)
        at org.broadinstitute.sting.gatk.io.storage.SAMFileWriterStorage.addAlignment(SAMFileWriterStorage.java:94)
        at org.broadinstitute.sting.gatk.io.stubs.SAMFileWriterStub.addAlignment(SAMFileWriterStub.java:307)
        at org.broadinstitute.sting.utils.haplotypeBAMWriter.HaplotypeBAMWriter.writeHaplotype(HaplotypeBAMWriter.java:310)
        at org.broadinstitute.sting.utils.haplotypeBAMWriter.HaplotypeBAMWriter.writeHaplotypesAsReads(HaplotypeBAMWriter.java:285)
        at org.broadinstitute.sting.utils.haplotypeBAMWriter.CalledHaplotypeBAMWriter.writeReadsAlignedToHaplotypes(CalledHaplotypeBAMWriter.java:87)
        at org.broadinstitute.sting.gatk.walkers.haplotypecaller.HaplotypeCaller.map(HaplotypeCaller.java:733)
        at org.broadinstitute.sting.gatk.walkers.haplotypecaller.HaplotypeCaller.map(HaplotypeCaller.java:138)
        at org.broadinstitute.sting.gatk.traversals.TraverseActiveRegions$TraverseActiveRegionMap.apply(TraverseActiveRegions.java:708)
        at org.broadinstitute.sting.gatk.traversals.TraverseActiveRegions$TraverseActiveRegionMap.apply(TraverseActiveRegions.java:704)
        at org.broadinstitute.sting.utils.nanoScheduler.NanoScheduler$ReadMapReduceJob.run(NanoScheduler.java:471)
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
        at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
##### ERROR ------------------------------------------------------------------------------------------
##### ERROR A GATK RUNTIME ERROR has occurred (version 2.6-2-ge03a5e9):
##### ERROR
##### ERROR Please check the documentation guide to see if this is a known problem
##### ERROR If not, please post the error, with stack trace, to the GATK forum
##### ERROR Visit our website and forum for extensive documentation and answers to 
##### ERROR commonly asked questions http://www.broadinstitute.org/gatk
##### ERROR
##### ERROR MESSAGE: Code exception (see stack trace for error itself)
##### ERROR ------------------------------------------------------------------------------------------

and with more threads allowed:


../jre1.7.0_25/bin/java -jar ../GenomeAnalysisTK-2.6-2-ge03a5e9/GenomeAnalysisTK.jar -R ../refs/bosTau6.lic.fa -T HaplotypeCaller -I ../Chr15.ir.bam -bamout Chr15.bam -o Chr15.vcf.gz -L Chr15 -nct 16 -rf BadCigar

#### ERROR ------------------------------------------------------------------------------------------
##### ERROR stack trace 
java.lang.IllegalArgumentException: Comparison method violates its general contract!
        at java.util.TimSort.mergeLo(Unknown Source)
        at java.util.TimSort.mergeAt(Unknown Source)
        at java.util.TimSort.mergeCollapse(Unknown Source)
        at java.util.TimSort.sort(Unknown Source)
        at java.util.Arrays.sort(Unknown Source)
        at net.sf.samtools.util.SortingCollection.spillToDisk(SortingCollection.java:203)
        at net.sf.samtools.util.SortingCollection.add(SortingCollection.java:150)
        at net.sf.samtools.SAMFileWriterImpl.addAlignment(SAMFileWriterImpl.java:170)
        at org.broadinstitute.sting.gatk.io.storage.SAMFileWriterStorage.addAlignment(SAMFileWriterStorage.java:94)
        at org.broadinstitute.sting.gatk.io.stubs.SAMFileWriterStub.addAlignment(SAMFileWriterStub.java:307)
        at org.broadinstitute.sting.utils.haplotypeBAMWriter.HaplotypeBAMWriter.writeReadAgainstHaplotype(HaplotypeBAMWriter.java:196)
        at org.broadinstitute.sting.utils.haplotypeBAMWriter.CalledHaplotypeBAMWriter.writeReadsAlignedToHaplotypes(CalledHaplotypeBAMWriter.java:103)
        at org.broadinstitute.sting.gatk.walkers.haplotypecaller.HaplotypeCaller.map(HaplotypeCaller.java:733)
        at org.broadinstitute.sting.gatk.walkers.haplotypecaller.HaplotypeCaller.map(HaplotypeCaller.java:138)
        at org.broadinstitute.sting.gatk.traversals.TraverseActiveRegions$TraverseActiveRegionMap.apply(TraverseActiveRegions.java:708)
        at org.broadinstitute.sting.gatk.traversals.TraverseActiveRegions$TraverseActiveRegionMap.apply(TraverseActiveRegions.java:704)
        at org.broadinstitute.sting.utils.nanoScheduler.NanoScheduler$ReadMapReduceJob.run(NanoScheduler.java:471)
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
        at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
##### ERROR ------------------------------------------------------------------------------------------
##### ERROR A GATK RUNTIME ERROR has occurred (version 2.6-2-ge03a5e9):
##### ERROR
##### ERROR Please check the documentation guide to see if this is a known problem
##### ERROR If not, please post the error, with stack trace, to the GATK forum
##### ERROR Visit our website and forum for extensive documentation and answers to 
##### ERROR commonly asked questions http://www.broadinstitute.org/gatk
##### ERROR
##### ERROR MESSAGE: Comparison method violates its general contract!
##### ERROR ------------------------------------------------------------------------------------------

Comments (6)

Trying to run

java -jar $GATKJAR -R $REF -T UnifiedGenotyper -I file1.bam -I file2.bam -I file3.bam -glm BOTH -o output.vcf.gz

gives an error like:

 ##### ERROR ------------------------------------------------------------------------------------------
 ##### ERROR A USER ERROR has occurred (version 2.4-9-g532efad): 
 ##### ERROR The invalid arguments or inputs must be corrected before the GATK can proceed
 ##### ERROR Please do not post this error to the GATK forum
 ##### ERROR
 ##### ERROR See the documentation (rerun with -h) for this tool to view allowable command-line arguments.
 ##### ERROR Visit our website and forum for extensive documentation and answers to 
 ##### ERROR commonly asked questions http://www.broadinstitute.org/gatk
 ##### ERROR
 ##### ERROR MESSAGE: There was a failure because temporary file /tmp/org.broadinstitute.sting.gatk.io.stubs.VariantContextWriterStub1033673347640679118.tmp could not be found while running the GATK with more than one thread.  Possible causes for this problem include: your system's open file handle limit is too small, your output or temp directories do not have sufficient space, or just an isolated file system blip
 ##### ERROR ------------------------------------------------------------------------------------------

The file is actually there, and is gzip-compressed and vcf-formatted.

However, if I specify -o output.vcf instead of -o output.vcf.gz, then everything works. I suspect the problem is with the autodetection of the codec. In VariantContextWriterStorage, LocalParallelizationProblem is thrown not only if the tmp file cannot be found, but whenever a FeatureDescriptor cannot be found for the file.

So... It seems like compressed output cannot be used from threaded processing with UnifiedGenotyper. Is my assessment correct?

  1. A better error message would be helpful to prevent others from trying the same thing I did.
  2. It would be nice to be able to write compressed output from a threaded UnifiedGenotyper, perhaps: a) the temp file could be written uncompressed even though the final file will be compressed, or b) the Codec-detection could detect gzip-compressed files?