We've moved!
This site is now read-only. You can find our new documentation site and support forum for posting questions here.
Be sure to read our welcome blog!

IncompatibleClassChangeError when running gatk BaseRecalibrator

Dear all,

I am using GATK's version:
$ gatk -version
Using GATK jar /home/gigiux/src/gatk/gatk-package-
with Java:
$ java -version
java version "10.0.2" 2018-07-17
Java(TM) SE Runtime Environment 18.3 (build 10.0.2+13)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.2+13, mixed mode)

On an Ubuntu 16 machine. I would like to use BaseRecalibrator to recalibrate the base quality of an alignment.

I removed the BAM file's duplicates with SAMBAMBA:
sambamba markdup -r --overflow-list-size 1000000 --hash-table-size 1000000 <input>.bam <output>.bam

I am using the VCF file clinvar.vcf.gz and the reference human Homo_sapiens.GRCh38.dna.toplevel.fa.gz, which I have called grch38.fa for short; both files call the chromosomes with numbers only.

I created the index fasta and dictionary of the reference sequence:
samtools faidx grch38.fa
java -jar ~/src/picard/picard.jar CreateSequenceDictionary R=grch38.fa O=grch38.dict

I then ran GATK with this:
gatk BaseRecalibrator -I <file>.bam -R ~/grch38.fa --known-sites ~/grch38.vcf.gz -O <file>.tab

but I got:

14:02:01.642 INFO  BaseRecalibrator - Initializing engine`
14:02:01.935 INFO  FeatureManager - Using codec VCFCodec to read file file:///home/gigiux/refSeq/human/grch38/old/grch38.vcf.gz`
14:02:01.969 WARN  IndexUtils - Feature file ` 
"/home/gigiux/refSeq/human/grch38/old/grch38.vcf.gz" appears to contain no sequence dictionary. Attempting to retrieve a sequence dictionary from the associated index file
 14:02:02.035 INFO  BaseRecalibrator - Done initializing engine`
 14:02:02.068 INFO  BaseRecalibrationEngine - The covariates being used here: `
 14:02:02.069 INFO  BaseRecalibrationEngine -   ReadGroupCovariate`
 14:02:02.069 INFO  BaseRecalibrationEngine -   QualityScoreCovariate`
 14:02:02.069 INFO  BaseRecalibrationEngine -   ContextCovariate`
 14:02:02.069 INFO  BaseRecalibrationEngine -   CycleCovariate`
 14:02:02.084 INFO  ProgressMeter - Starting traversal`
 14:02:02.084 INFO  ProgressMeter -        Current Locus  Elapsed Minutes       Reads Processed     Reads/Minute`
 14:02:02.087 INFO  BaseRecalibrator - Shutting down engine`
 [27 September 2018 at 14:02:02 CEST] ` 
 org.broadinstitute.hellbender.tools.walkers.bqsr.BaseRecalibrator done. Elapsed time: 0.01 minutes.`
 Exception in thread "main" java.lang.IncompatibleClassChangeError: Inconsistent constant pool data in classfile for class org/broadinstitute/hellbender/transformers/ReadTransformer. `
 Method lambda$identity$d67512bf$1(Lorg/broadinstitute/hellbender/utils/read/GATKRead;)Lorg/broadinstitute/hellbender/utils/read/GATKRead; at index 65 is CONSTANT_MethodRef and should be CONSTANT_InterfaceMethodRef`

I think the main message is: Exception in thread "main" java.lang.IncompatibleClassChangeError
at index 65 is CONSTANT_MethodRef and should be CONSTANT_InterfaceMethodRef.

How can I sort this out? How could that variable be changed? (I haven't touch anything within GATK...)

Thank you


  • LouisBLouisB Broad InstituteMember, Broadie, Dev ✭✭✭

    Hi @Gigiux,

    I believe the problem is due to the fact that you're running java 10. GATK is currently only able to run on Java 8. Could you try again with Java 8 and see if the problem resolves?

    We'd like to support Java 9+ but it's a non-trivial change and we have no timeline to do so currently. We're stuck on 8 until a number of libraries we depend on start to support newer versions.


  • GigiuxGigiux Member

    Thank you. Can I install multiple version of Java? Do I need to tell GATK what version it shall use with a particular flag? Can I use openJDK?

  • GigiuxGigiux Member

    Looks like I can work with openJDK: I changed the default java version with:
    $ sudo update-alternatives --config java
    [sudo] password for :
    There are 2 choices for the alternative java (providing /usr/bin/java).

      Selection    Path                                            Priority   Status
      0            /usr/lib/jvm/java-10-oracle/bin/java             1091      auto mode
      1            /usr/lib/jvm/java-10-oracle/bin/java             1091      manual mode
    * 2            /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java   1081      manual mode

    I selected option 2 and then run GATK; the output was:
    Press to keep the current choice[*], or type selection number:
    11:37:38.556 INFO ProgressMeter - Traversal complete. Processed 57868745 total reads in 18.4 minutes.
    11:37:38.722 INFO BaseRecalibrator - Calculating quantized quality scores...
    11:37:38.737 INFO BaseRecalibrator - Writing recalibration report...
    11:37:39.516 INFO BaseRecalibrator - ...done!
    11:37:39.516 INFO BaseRecalibrator - Shutting down engine
    [01 October 2018 11:37:39 CEST] org.broadinstitute.hellbender.tools.walkers.bqsr.BaseRecalibrator done. Elapsed time: 18.89 minutes.
    Tool returned:

Sign In or Register to comment.