A GATK RUNTIME ERROR has occurred (version 3.1-0-g72492bb):

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

java.lang.ExceptionInInitializerError
at org.broadinstitute.sting.gatk.GenomeAnalysisEngine.(GenomeAnalysisEngine.java:167)
at org.broadinstitute.sting.gatk.CommandLineExecutable.(CommandLineExecutable.java:57)
at org.broadinstitute.sting.gatk.CommandLineGATK.(CommandLineGATK.java:66)
at org.broadinstitute.sting.gatk.CommandLineGATK.main(CommandLineGATK.java:106)
Caused by: java.lang.NullPointerException
at org.reflections.Reflections.scan(Reflections.java:220)
at org.reflections.Reflections.scan(Reflections.java:166)
at org.reflections.Reflections.(Reflections.java:94)
at org.broadinstitute.sting.utils.classloader.PluginManager.(PluginManager.java:79)
... 4 more

ERROR ------------------------------------------------------------------------------------------
ERROR A GATK RUNTIME ERROR has occurred (version 3.1-0-g72492bb):
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 ------------------------------------------------------------------------------------------

Answers

  • Guanghao LeeGuanghao Lee ChinaMember

    This problem occurred when I tried to execute the mutec program.
    The command line is : java -jar mutect-1.1.7.jar -h
    And my java version is jdk1.8
    Thank you!

  • SheilaSheila Broad InstituteMember, Broadie, Moderator admin

    @Guanghao Lee
    Hi,

    Can you try upgrading to the latest version of GATK?

    Thanks,
    Sheila

  • SheilaSheila Broad InstituteMember, Broadie, Moderator admin

    @Guanghao Lee
    Hi again,

    You may also try using Java version 1.7. The Java version incompatibility may be causing the error.

    -Sheila

  • Guanghao LeeGuanghao Lee ChinaMember

    @Sheila said:
    @Guanghao Lee
    Hi again,

    You may also try using Java version 1.7. The Java version incompatibility may be causing the error.

    -Sheila

    Thank you very much!
    I try to use java version 1.7, then mutec work well.
    Best wished to you!

  • Hi @Sheila and @Guanghao Lee,

    I met this error too. I used GATK 3.8, Mutect 1.1.7 and my Java version is 1.7.0_79. How can I fix this problem?

    Best,
    Frank

  • shleeshlee CambridgeMember, Broadie, Moderator admin

    Hi @FrankWang,

    GATKv3.8 uses Java 8. Please upgrade your Java version.

  • shleeshlee CambridgeMember, Broadie, Moderator admin
    edited January 2018

    correction:
    Also, just viewing the past thread, for anyone needing to use mutect-1.1.7.jar, it uses Java 7, while mutect-1.1.6 uses Java 6.

  • Hi @shlee,

    Thank you for your reply. However, I did use Java 1.8 for GATKv3.8. When using mutect-1.1.7.jar, I changed my java version to Java 1.7.

    Best,
    Frank

  • shleeshlee CambridgeMember, Broadie, Moderator admin
    edited January 2018

    @FrankWang,

    Can you please post the exact command you are running and the standard output that is printed to the screen?

    Just to clarify, it's not possible to use MuTect1 from the GATK3.8 jar. GATKv3.8 only offers MuTect2. We offer mutect-1.1.7.jar separately, from https://software.broadinstitute.org/gatk/download/mutect. So if you are using GATK3.8, you need to use Java 8. If you are using mutect-1.1.7, then you need to make sure your system is running Java 7.

    Speaking of all these versions, we recommend users switch to GATK4 Mutect2.

    Post edited by shlee on
  • FrankWangFrankWang Member
    edited January 2018

    Hi @shlee,

    Here is my command:

    java -Xmx8g -jar /SofWar/MuTect/mutect-1.1.7.jar \
        --analysis_type MuTect \
        --reference_sequence /SofWar/MuTect/human_g1k_v37.fasta \
        --cosmic /SofWar/MuTect/b37_cosmic_v54_120711.vcf \
        --dbsnp /SofWar/MuTect/dbsnp_132_b37.leftAligned.vcf \
        --intervals /SofWar/MuTect/S07604514_Regions_Mutect_intervals.list \
        --input_file:normal my_normal.bam \
        --input_file:tumor my_tumor.bam \
        --out my_out
    

    And here is the error:

    ##### ERROR ------------------------------------------------------------------------------------------
    ##### ERROR stack trace 
    java.lang.ExceptionInInitializerError
            at org.broadinstitute.sting.gatk.GenomeAnalysisEngine.<init>(GenomeAnalysisEngine.java:167)
            at org.broadinstitute.sting.gatk.CommandLineExecutable.<init>(CommandLineExecutable.java:57)
            at org.broadinstitute.sting.gatk.CommandLineGATK.<init>(CommandLineGATK.java:66)
            at org.broadinstitute.sting.gatk.CommandLineGATK.main(CommandLineGATK.java:106)
    Caused by: java.lang.NullPointerException
            at org.reflections.Reflections.scan(Reflections.java:220)
            at org.reflections.Reflections.scan(Reflections.java:166)
            at org.reflections.Reflections.<init>(Reflections.java:94)
            at org.broadinstitute.sting.utils.classloader.PluginManager.<clinit>(PluginManager.java:79)
            ... 4 more
    ##### ERROR ------------------------------------------------------------------------------------------
    ##### ERROR A GATK RUNTIME ERROR has occurred (version 3.1-0-g72492bb):
    ##### 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 ------------------------------------------------------------------------------------------
    

    Thank you so much.

    Best,
    Frank

    Post edited by shlee on
  • shleeshlee CambridgeMember, Broadie, Moderator admin

    @FrankWang, can you also post the section of the standard out that appears immediately after you enter the command? It will show your system environment. Here we can confirm default settings in play as well as the java version that the tool is invoking.

  • shleeshlee CambridgeMember, Broadie, Moderator admin
    edited January 2018

    Actually, let me post some commands I have used in the past that I know work. One thing is to specify the output file as --vcf. I think the MAF gets output to the screen in certain situations.

    Here mutect1=/Applications/genomicstools/mutect-1.1.7.jar and I've confirmed the java version with java -version:

    -bash-4.1$ java -version
    java version "1.7.0_71"
    Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
    Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)
    
    java -jar $mutect1 --analysis_type MuTect \
        --reference_sequence ~/Documents/ref/hg38_mini/chr19_chr19_KI270866v1_alt.fasta \
        --input_file:normal papa_snaut.bam \
        --input_file:tumor paalt_snaut.bam \
        --out N_papa_T_paalt_mt1.txt \
        --coverage_file N_papa_T_paalt_mt1_coverage.wig.txt
    
    java -jar -Xmx4g /home/unix/shlee/mutect-1.1.7.jar -T MuTect \
        -R /humgen/gsa-hpprojects/dev/shlee/ref/GRCh38_1kg/GRCh38_full_analysis_set_plus_decoy_hla.fa \
        -I:normal hcc1143_N_md.bam \
        -I:tumor hcc1143_T_md.bam \
        --fraction_contamination 0.057 \
        --dbsnp /humgen/gsa-hpprojects/dev/shlee/ref/GRCh38_1kg/other_mapping_resources/ALL_20141222.dbSNP142_human_GRCh38.snps.vcf.gz \
        --cosmic /humgen/gsa-hpprojects/dev/shlee/ref/GRCh38_1kg/other_mapping_resources/CosmicCodingMuts_grch38.vcf.gz \
        --normal_panel /humgen/gsa-hpprojects/dev/shlee/hcc/pon/1kg_40_m2pon_sitesonly_m1fix.vcf.gz \
        --vcf chr20_hcc1143_mutect117_fraccontam.vcf \
        --coverage_file chr20_hcc1143_mutect117_fraccontam_coverage.wig.txt \
        --power_file chr20_hcc1143_mutect117_fraccontam_power.wig.txt \
        -L chr20
    

    Your stack trace includes a java.lang.NullPointerException. Are you certain all of the elements you point to in your command exist where you specify them?

  • Hi @shlee,

    Great! The problem is gone. Mutect works well now. Thank you for your time and help.

    Best,
    Frank

  • shleeshlee CambridgeMember, Broadie, Moderator admin

    You're welcome Frank. If you can post what you did that solved the issue, it will be helpful to other users who encounter the same error. Thanks.

Sign In or Register to comment.