Comparison method violates its general contract!

bwubbbwubb Member
edited October 2012 in MuTect v1

I apologize, but I have been unable to troubleshoot my issue with running MuTect on my own. I am unsure if there is an issue with my arguments or with one of my inputs or maybe even java itself. I receive this error

Error processing 1:12855123
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.mergeCollapse(TimSort.java:410)
at java.util.TimSort.sort(TimSort.java:214)
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.MuTectWalker.map(MuTectWalker.java:664)
at org.broadinstitute.cga.tools.gatk.walkers.cancer.mutect.MuTectWalker.map(MuTectWalker.java:34)
at org.broadinstitute.sting.gatk.traversals.TraverseLoci.traverse(TraverseLoci.java:77)
at org.broadinstitute.sting.gatk.traversals.TraverseLoci.traverse(TraverseLoci.java:18)
at org.broadinstitute.sting.gatk.executive.LinearMicroScheduler.execute(LinearMicroScheduler.java:61)
at org.broadinstitute.sting.gatk.GenomeAnalysisEngine.execute(GenomeAnalysisEngine.java:225)
at org.broadinstitute.sting.gatk.CommandLineExecutable.execute(CommandLineExecutable.java:104)
at org.broadinstitute.sting.commandline.CommandLineProgram.start(CommandLineProgram.java:227)
at org.broadinstitute.sting.gatk.CommandLineGATK.main(CommandLineGATK.java:89)

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.MuTectWalker.map(MuTectWalker.java:865)
at org.broadinstitute.cga.tools.gatk.walkers.cancer.mutect.MuTectWalker.map(MuTectWalker.java:34)
at org.broadinstitute.sting.gatk.traversals.TraverseLoci.traverse(TraverseLoci.java:77)
at org.broadinstitute.sting.gatk.traversals.TraverseLoci.traverse(TraverseLoci.java:18)
at org.broadinstitute.sting.gatk.executive.LinearMicroScheduler.execute(LinearMicroScheduler.java:61)
at org.broadinstitute.sting.gatk.GenomeAnalysisEngine.execute(GenomeAnalysisEngine.java:225)
at org.broadinstitute.sting.gatk.CommandLineExecutable.execute(CommandLineExecutable.java:104)
at org.broadinstitute.sting.commandline.CommandLineProgram.start(CommandLineProgram.java:227)
at org.broadinstitute.sting.gatk.CommandLineGATK.main(CommandLineGATK.java:89)
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.mergeCollapse(TimSort.java:410)
at java.util.TimSort.sort(TimSort.java:214)
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.MuTectWalker.map(MuTectWalker.java:664)
... 8 more

ERROR ------------------------------------------------------------------------------------------
ERROR A GATK RUNTIME ERROR has occurred (version 1.1-37-g5cedb2d):

I can provide my command line and anything else. I do not understand what is going wrong. Thank you.

Best Answer

Answers

  • Hi
    We are getting the same issue. Any luck yet?

  • bwubbbwubb Member

    None yet, no. I double checked that I have the most current version (I do). I did a first attempt to look up the error on java forums, but I cannot figure how the explanations I found would apply to my analysis. If it is something wrong with my input files, I have yet to figure out what.

  • rlopezrlopez Member

    Maybe you should post the command, that will give the forum a better chance of helping you. I was able to run it and interpret the results with no problems by using the example posted on the mutect website

  • bwubbbwubb Member

    My command should mimic the example given:

    java -Xmx5120m -jar muTect-1.0.27783.jar \ --analysis_type MuTect \ --reference_sequence ~/b37_genomes/human_g1k_v37.fasta \ -B:cosmic,VCF ~/b37_genomes/hg19_cosmic_v54_120711.vcf -B:dbsnp,VCF ~/b37_genomes/dbsnp_135.b37.vcf \ --intervals ~/MuTect/MuTect.exons.intervals.txt \ --input_file:normal ~/NGS_analysis/PCC_Exome_pilot/DATA/$norm/PE.merged.recal.bam \ --input_file:tumor ~/NGS_analysis/PCC_Exome_pilot/DATA/$tumor/PE.merged.recal.bam \ --out ~/NGS_analysis/PCC_Exome_pilot/MuTect_RESULTS/"$tumor".call_stats.txt \ --coverage_file ~/NGS_analysis/PCC_Exome_pilot/MuTect_RESULTS/"$tumor".coverage.txt

    My interval file is set up as such

    1:14467-14587 1:14639-14883 1:14943-15064 1:15671-15990 1:16591-16719 1:16750-17074 1:17178-17420 1:17443-18108 1:18203-18448 ...

  • rlopezrlopez Member

    I don't see any problems in your command, should you try a small test, to eliminate possibilities? i.e. with a small verified bwa aligned bam file, just to make sure is not the bam file?

  • bwubbbwubb Member

    I dont know if it counts, but the bams Im using have already been run through GATK UG. Both the normal and the control. No errors with that.

    Maybe I will try pulling out just chr 1 and its intervals.

  • bwubbbwubb Member

    So far I have been unable to get it to work with Java 6 either.

    Completely new error, that might be an issue with our computing system. In the process of checking that.

  • alexbmpalexbmp Member

    Hi all.
    I've been facing the same problem.
    When using java 1.7.0_02 I had exactly the same problem;
    however when I used java 1.6.0_24, the problem disappeared!

  • Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie admin

    Folks, muTect essentially has the same platform requirement as the GATK: Java 1.7 is presently not supported. We are planning to add support for 1.7 to GATK in the future (which the muTect developers may eventually extend to muTect), but it probably won't be for several months. In the meantime, your mileage with 1.7 may vary wildly; I would suggest just using 1.6. You should be able to set up coexisting versions of Java and just specify 1.6 when you run muTect and/or GATK.

  • frankibfrankib Sherbrooke, CanadaMember

    @Geraldine_VdAuwera said:
    Folks, muTect essentially has the same platform requirement as the GATK: Java 1.7 is presently not supported. We are planning to add support for 1.7 to GATK in the future (which the muTect developers may eventually extend to muTect), but it probably won't be for several months. In the meantime, your mileage with 1.7 may vary wildly; I would suggest just using 1.6. You should be able to set up coexisting versions of Java and just specify 1.6 when you run muTect and/or GATK.

    Is this problem is solved, do we still have to use Java 6 today?

  • Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie admin

    That is a very old post; since then we have ported GATK to Java 7. I am not sure whether MuTect runs on 6 or 7, perhaps @kcibul can weigh in on this.

  • kcibulkcibul Cambridge, MAMember, Broadie, Dev ✭✭✭

    The latest version, available in GitHub, support Java 7. Try building from there!

  • mmterpstrammterpstra NetherlandsMember

    @kcibul : The CGA website has to update the following webpage then http://www.broadinstitute.org/cancer/cga/mutect_download this will decrease load on this page.

  • JiHyeKimJiHyeKim SeoulMember

    Does muTect support Java 1.8.0 & GATK3.1-1? I am trying to run MuTect with example files, but there is a error "##### ERROR A GATK RUNTIME ERROR has occurred (version 2.2-25-g2a68eab): "; I am using Java 1.8.0 & GATK3.1-1. ;( Does anybody know the reason of this error? Thanks, Gina.

  • munzmattmunzmatt GermanyMember

    I have got this error with java version "1.7.0_55" and muTect-1.1.4.jar. Is http://www.broadinstitute.org/cancer/cga/mutect_download not updated yet?

  • Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie admin

    @munzmatt I don't think it has been updated, no. We are working on an improved website platform to provide access to the cancer analysis tools; in the meantime you still need to build from the github source. Sorry for the inconvenience. We'll try to get that resolved soon.

  • ChiragNepalChiragNepal CopenhagenMember

    Hi @Geraldine_VdAuwera‌

    I am running muTect with the following parameter
    java -Xmx8g -jar ~/unixTools/muTect-1.1.4-bin/muTect-1.1.4.jar --analysis_type MuTect --reference_sequence GATKDictionary/ucsc.hg19.fasta --cosmic GATKDictionary/CosmicCodingMuts_v68_Modified.vcf --dbsnp GATKDictionary/dbsnp_138.hg19.vcf --input_file:normal bamRealigned/Sample_ST1_CC008T_IndelRealigned.bam --input_file:tumor bamRealigned/Sample_ST2_CC008N_IndelRealigned.bam --out Test.stats.out --coverage_file Test.wig.text

    Then i get an error:

    INFO 14:36:56,020 MuTect - [MUTECTOR] Processed 10000761 reads in 1797 ms
    INFO 14:36:58,762 MuTect - [MUTECTOR] Processed 11000802 reads in 2741 ms
    INFO 14:37:02,604 MuTect - [MUTECTOR] Processed 12000802 reads in 3843 ms
    INFO 14:37:04,389 MuTect - [MUTECTOR] Inspected 4000 potential candidates
    INFO 14:37:06,420 MuTect - [MUTECTOR] Processed 13000925 reads in 3815 ms
    Error processing chr1:1647928
    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)
    WARN 14:37:13,969 RestStorageService - Error Response: PUT '/GATK_Run_Reports/nNtWW8OY5KLWZux8B7wo9z8cMu1WyiS7.report.xml.gz' -- ResponseCode: 403, ResponseStatus: Forbidden, Request Headers: [Content-Length: 1067, Content-MD5: RVo+LR+MJdBgwOqINdyFPA==, Content-Type: application/octet-stream, x-amz-meta-md5-hash: 455a3e2d1f8c25d060c0ea8835dc853c, Date: Fri, 31 Oct 2014 13:37:11 GMT, Authorization: AWS AKIAJXU7VIHBPDW4TDSQ:mHVBJnorY3Dd5/pv5wjL31xZ/dA=, User-Agent: JetS3t/0.8.1 (Linux/3.2.0-4-amd64; amd64; en; JVM 1.7.0_72), Host: s3.amazonaws.com, Expect: 100-continue], Response Headers: [x-amz-request-id: EE6FAAFBD486443A, x-amz-id-2: HcMla02L9k7f6q60RZfcVe2qmFWMf7xgdR3KeYdVz8OlNcUYzj5hSaLJyb/bwl79, Content-Type: application/xml, Transfer-Encoding: chunked, Date: Fri, 31 Oct 2014 13:37:13 GMT, Connection: close, Server: AmazonS3]

    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.traver

    Could you please help me with this.

  • Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie admin

    @ChiragNepal, what version of java are you using?

  • abaanoabaano Member

    MuTect does or does not support java 7 and 8. Do we need to run with 6, I am getting the same error on 7.

  • Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie admin

    @abaano, it depends what version you are using. Up to MuTect 1.1.4 you need Java 6. Later versions (in github, not yet available as precompiled jars) use Java 7.

  • abaanoabaano Member

    @Geraldine_VdAuwera‌ Thank you for the clarification.

Sign In or Register to comment.