Tagged with #java7
0 documentation articles | 0 announcements | 2 forum discussions


No articles to display.

No articles to display.


Created 2014-04-07 14:25:26 | Updated | Tags: bug java7 fastaalternatereferencemaker negativearraysizeexception

Comments (1)

I was working with FastaAlternateReferenceMaker today. I wanted to use it on two samples. The first sample worked fine. The second sample came up with an error about a few REF values not conforming (e.g. :A) in the vcf. I wrote a script to correct the errors and remove the : from the vcf file. I tried to run it again, but received memory allocation errors. So, I dealt with that and am now allocating 6g for a 15G VCF and a 188M fasta reference. I got it running (I think) and then started getting the NegativeArraySizeException java error. I saw this had come up as a bug in earlier versions of GATK, but it seemed like it had been resolved...perhaps not? Anyhow, this 'quick little run' has taken up the better part of my day and I would be super greatful for some assistance troubleshooting this problem.

Command: $ java -Xmx6g -jar ../../shays/GATK/GenomeAnalysisTK.jar -l ERROR -R ../up/chrom6.2.fa -T FastaAlternateReferenceMaker -o D-chr6.cons.fa --variant D-c6.vcf

Trace:

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

java.lang.NegativeArraySizeException at org.broad.tribble.readers.AsciiLineReader.readLine(AsciiLineReader.java:101) at org.broad.tribble.readers.AsciiLineReader.readLine(AsciiLineReader.java:120) at org.broadinstitute.variant.vcf.VCFCodec.readHeader(VCFCodec.java:85) at org.broad.tribble.AsciiFeatureCodec.readHeader(AsciiFeatureCodec.java:76) at org.broad.tribble.index.IndexFactory$FeatureIterator.readHeader(IndexFactory.java:366) at org.broad.tribble.index.IndexFactory$FeatureIterator.(IndexFactory.java:354) at org.broad.tribble.index.IndexFactory.createDynamicIndex(IndexFactory.java:281) at org.broadinstitute.sting.gatk.refdata.tracks.RMDTrackBuilder.createIndexInMemory(RMDTrackBuilder.java:388) at org.broadinstitute.sting.gatk.refdata.tracks.RMDTrackBuilder.loadIndex(RMDTrackBuilder.java:274) at org.broadinstitute.sting.gatk.refdata.tracks.RMDTrackBuilder.getFeatureSource(RMDTrackBuilder.java:211) at org.broadinstitute.sting.gatk.refdata.tracks.RMDTrackBuilder.createInstanceOfTrack(RMDTrackBuilder.java:140) at org.broadinstitute.sting.gatk.datasources.rmd.ReferenceOrderedQueryDataPool.(ReferenceOrderedDataSource.java:208) at org.broadinstitute.sting.gatk.datasources.rmd.ReferenceOrderedDataSource.(ReferenceOrderedDataSource.java:88) at org.broadinstitute.sting.gatk.GenomeAnalysisEngine.getReferenceOrderedDataSources(GenomeAnalysisEngine.java:873) at org.broadinstitute.sting.gatk.GenomeAnalysisEngine.initializeDataSources(GenomeAnalysisEngine.java:725) at org.broadinstitute.sting.gatk.GenomeAnalysisEngine.execute(GenomeAnalysisEngine.java:259) at org.broadinstitute.sting.gatk.CommandLineExecutable.execute(CommandLineExecutable.java:113) at org.broadinstitute.sting.commandline.CommandLineProgram.start(CommandLineProgram.java:245) at org.broadinstitute.sting.commandline.CommandLineProgram.start(CommandLineProgram.java:152) at org.broadinstitute.sting.gatk.CommandLineGATK.main(CommandLineGATK.java:91)

ERROR ------------------------------------------------------------------------------------------
ERROR A GATK RUNTIME ERROR has occurred (version 2.5-2-gf57256b):
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 ------------------------------------------------------------------------------------------

Created 2013-04-11 21:45:02 | Updated | Tags: mutect java illegalargumentexception java7

Comments (3)

The following is only a problem under Java 7. Under Java 6, it seems to work fine, but it seems to be crashing for a valid reason on Java 7, so it might be worthwhile fixing. I can provide the bam file, if needed.

$ java     -Xmx2g     -jar /home/kmsquire/src/muTect-1.1.4/muTect-1.1.4.jar     --analysis_type MuTect     --reference_sequence /scratch0/ref/hs37d5/hs37d5.fa     --cosmic /home/kmsquire/src/muTect-1.1.4/b37_cosmic_v54_120711.vcf     --dbsnp /home/kmsquire/Data/resources/dbsnp_135.b37.vcf     --intervals 7:55086724-55275031     --input_file:normal TCGA-02-0003-10A.7:50390631-59554330.realigned.recal.bam     --input_file:tumor TCGA-02-0003-01A.7:50390631-59554330.realigned.recal.bam     --out TCGA-02-0003.muTect.out     --coverage_file TCGA-02-0003.coverage.wig.txt  -vcf TCGA-02-0003.muTect.vcf
INFO  14:19:28,652 HelpFormatter - --------------------------------------------------------------------------------- 
INFO  14:19:28,654 HelpFormatter - The Genome Analysis Toolkit (GATK) v2.2-25-g2a68eab, Compiled 2012/11/08 10:30:02 
INFO  14:19:28,655 HelpFormatter - Copyright (c) 2010 The Broad Institute 
INFO  14:19:28,655 HelpFormatter - For support and documentation go to http://www.broadinstitute.org/gatk 
INFO  14:19:28,660 HelpFormatter - Program Args: --analysis_type MuTect --reference_sequence /scratch0/ref/hs37d5/hs37d5.fa --cosmic /home/kmsquire/src/muTect-1.1.4/b37_cosmic_v54_120711.vcf --dbsnp /home/kmsquire/Data/resources/dbsnp_135.b37.vcf --intervals 7:55086724-55275031 --input_file:normal TCGA-02-0003-10A.7:50390631-59554330.realigned.recal.bam --input_file:tumor TCGA-02-0003-01A.7:50390631-59554330.realigned.recal.bam --out TCGA-02-0003.muTect.out --coverage_file TCGA-02-0003.coverage.wig.txt -vcf TCGA-02-0003.muTect.vcf 
INFO  14:19:28,660 HelpFormatter - Date/Time: 2013/04/11 14:19:28 
INFO  14:19:28,660 HelpFormatter - --------------------------------------------------------------------------------- 
INFO  14:19:28,660 HelpFormatter - --------------------------------------------------------------------------------- 
INFO  14:19:28,686 ArgumentTypeDescriptor - Dynamically determined type of /home/kmsquire/Data/resources/dbsnp_135.b37.vcf to be VCF 
INFO  14:19:28,690 ArgumentTypeDescriptor - Dynamically determined type of /home/kmsquire/src/muTect-1.1.4/b37_cosmic_v54_120711.vcf to be VCF 
INFO  14:19:28,698 GenomeAnalysisEngine - Strictness is SILENT 
INFO  14:19:28,784 GenomeAnalysisEngine - Downsampling Settings: Method: BY_SAMPLE Target Coverage: 1000  
INFO  14:19:28,792 SAMDataSource$SAMReaders - Initializing SAMRecords in serial 
INFO  14:19:28,861 SAMDataSource$SAMReaders - Done initializing BAM readers: total time 0.07 
INFO  14:19:28,882 RMDTrackBuilder - Loading Tribble index from disk for file /home/kmsquire/Data/resources/dbsnp_135.b37.vcf 
WARN  14:19:29,054 VCFStandardHeaderLines$Standards - Repairing standard header line for field AF because -- count types disagree; header has UNBOUNDED but standard is A 
INFO  14:19:29,057 RMDTrackBuilder - Loading Tribble index from disk for file /home/kmsquire/src/muTect-1.1.4/b37_cosmic_v54_120711.vcf 
INFO  14:19:29,118 GenomeAnalysisEngine - Processing 188308 bp from intervals 
INFO  14:19:29,129 ProgressMeter - [INITIALIZATION COMPLETE; STARTING PROCESSING] 
INFO  14:19:29,130 ProgressMeter -        Location processed.sites  runtime per.1M.sites completed total.runtime remaining 
INFO  14:19:34,956 MuTect - [MUTECTOR] Processed 1000004 reads in 5608 ms 
INFO  14:19:36,986 MuTect - [MUTECTOR] Inspected 1000 potential candidates 
INFO  14:19:37,669 MuTect - [MUTECTOR] Processed 2000006 reads in 2713 ms 
INFO  14:19:40,367 MuTect - [MUTECTOR] Processed 3000834 reads in 2697 ms 
INFO  14:19:42,183 MuTect - [MUTECTOR] Processed 4001134 reads in 1817 ms 
Error processing 7:55219159
java.lang.IllegalArgumentException: Comparison method violates its general contract!
    at java.util.TimSort.mergeLo(TimSort.java:747)
    at java.util.TimSort.mergeAt(TimSort.java:483)
    at java.util.TimSort.mergeForceCollapse(TimSort.java:426)
    at java.util.TimSort.sort(TimSort.java:223)
    at java.util.TimSort.sort(TimSort.java:173)
    at java.util.Arrays.sort(Arrays.java:659)
    at java.util.Collections.sort(Collections.java:217)
    at org.broadinstitute.cga.tools.gatk.walkers.cancer.mutect.MuTect.map(MuTect.java:480)
    at org.broadinstitute.cga.tools.gatk.walkers.cancer.mutect.MuTect.map(MuTect.java:34)
    at org.broadinstitute.sting.gatk.traversals.TraverseLociNano$TraverseLociMap.apply(TraverseLociNano.java:243)
    at org.broadinstitute.sting.gatk.traversals.TraverseLociNano$TraverseLociMap.apply(TraverseLociNano.java:231)
    at org.broadinstitute.sting.utils.nanoScheduler.NanoScheduler.executeSingleThreaded(NanoScheduler.java:287)
    at org.broadinstitute.sting.utils.nanoScheduler.NanoScheduler.execute(NanoScheduler.java:252)
    at org.broadinstitute.sting.gatk.traversals.TraverseLociNano.traverse(TraverseLociNano.java:120)
    at org.broadinstitute.sting.gatk.traversals.TraverseLociNano.traverse(TraverseLociNano.java:67)
    at org.broadinstitute.sting.gatk.traversals.TraverseLociNano.traverse(TraverseLociNano.java:23)
    at org.broadinstitute.sting.gatk.executive.LinearMicroScheduler.execute(LinearMicroScheduler.java:74)
    at org.broadinstitute.sting.gatk.GenomeAnalysisEngine.execute(GenomeAnalysisEngine.java:281)
    at org.broadinstitute.sting.gatk.CommandLineExecutable.execute(CommandLineExecutable.java:113)
    at org.broadinstitute.sting.commandline.CommandLineProgram.start(CommandLineProgram.java:236)
    at org.broadinstitute.sting.commandline.CommandLineProgram.start(CommandLineProgram.java:146)
    at org.broadinstitute.sting.gatk.CommandLineGATK.main(CommandLineGATK.java:93)
INFO  14:19:44,552 GATKRunReport - Uploaded run statistics report to AWS S3 
##### ERROR ------------------------------------------------------------------------------------------
##### ERROR stack trace 
java.lang.RuntimeException: java.lang.IllegalArgumentException: Comparison method violates its general contract!
    at org.broadinstitute.cga.tools.gatk.walkers.cancer.mutect.MuTect.map(MuTect.java:712)
    at org.broadinstitute.cga.tools.gatk.walkers.cancer.mutect.MuTect.map(MuTect.java:34)
    at org.broadinstitute.sting.gatk.traversals.TraverseLociNano$TraverseLociMap.apply(TraverseLociNano.java:243)
    at org.broadinstitute.sting.gatk.traversals.TraverseLociNano$TraverseLociMap.apply(TraverseLociNano.java:231)
    at org.broadinstitute.sting.utils.nanoScheduler.NanoScheduler.executeSingleThreaded(NanoScheduler.java:287)
    at org.broadinstitute.sting.utils.nanoScheduler.NanoScheduler.execute(NanoScheduler.java:252)
    at org.broadinstitute.sting.gatk.traversals.TraverseLociNano.traverse(TraverseLociNano.java:120)
    at org.broadinstitute.sting.gatk.traversals.TraverseLociNano.traverse(TraverseLociNano.java:67)
    at org.broadinstitute.sting.gatk.traversals.TraverseLociNano.traverse(TraverseLociNano.java:23)
    at org.broadinstitute.sting.gatk.executive.LinearMicroScheduler.execute(LinearMicroScheduler.java:74)
    at org.broadinstitute.sting.gatk.GenomeAnalysisEngine.execute(GenomeAnalysisEngine.java:281)
    at org.broadinstitute.sting.gatk.CommandLineExecutable.execute(CommandLineExecutable.java:113)
    at org.broadinstitute.sting.commandline.CommandLineProgram.start(CommandLineProgram.java:236)
    at org.broadinstitute.sting.commandline.CommandLineProgram.start(CommandLineProgram.java:146)
    at org.broadinstitute.sting.gatk.CommandLineGATK.main(CommandLineGATK.java:93)
Caused by: java.lang.IllegalArgumentException: Comparison method violates its general contract!
    at java.util.TimSort.mergeLo(TimSort.java:747)
    at java.util.TimSort.mergeAt(TimSort.java:483)
    at java.util.TimSort.mergeForceCollapse(TimSort.java:426)
    at java.util.TimSort.sort(TimSort.java:223)
    at java.util.TimSort.sort(TimSort.java:173)
    at java.util.Arrays.sort(Arrays.java:659)
    at java.util.Collections.sort(Collections.java:217)
    at org.broadinstitute.cga.tools.gatk.walkers.cancer.mutect.MuTect.map(MuTect.java:480)
    ... 14 more
##### ERROR ------------------------------------------------------------------------------------------
##### ERROR A GATK RUNTIME ERROR has occurred (version 2.2-25-g2a68eab):
##### ERROR
##### ERROR Please visit the wiki 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: java.lang.IllegalArgumentException: Comparison method violates its general contract!
##### ERROR ------------------------------------------------------------------------------------------

The specific version of java is

$ java -version
java version "1.7.0_03"
Java(TM) SE Runtime Environment (build 1.7.0_03-b04)
Java HotSpot(TM) 64-Bit Server VM (build 22.1-b02, mixed mode)