Download the latest Picard release at https://github.com/broadinstitute/picard/releases.
GATK version 4.beta.5 is out. See the GATK4 beta page for download and details.

Bug report: java.lang.IllegalArgumentException: Comparison method violates its general contract!

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)

Best Answer

Answers

Sign In or Register to comment.