Quantcast
Channel: Recent Discussions — GATK-Forum
Viewing all articles
Browse latest Browse all 12345

java.lang.ArrayIndexOutOfBoundsException in BaseRecalibrator on Grc38

$
0
0

I get a consistent failure with BaseRecalibrator on a handful of samples. It occurs with every version of GATK from 3.5 to 3.8 and the current nightly build. I've also tried altering the max memory given to java and changing the knownSites file. It fails the same. I've trimmed the command line down to the minimum necessary to generate the error, and I've trimmed the input files to the minimum section needed to generate the failure (a specific single read).

You can find the failure below, but I also dug out the location of the failure with a proposed fix.

The failure occurs here --> line 184 of public/gatk-engine/src/main/java/org/broadinstitute/gatk/engine/recalibration/covariates/ContextCovariate.java

        while (bases[currentNPenalty] != 'N') {
            final int baseIndex = BaseUtils.simpleBaseToBaseIndex(bases[currentNPenalty]);
            currentKey |= (baseIndex << offset);
            offset -= 2;
            currentNPenalty--;
        }

The current while loop allows the array index to become negative and walk right off the edge. So a proposed fix is as follows (assuming it does not break the covariate logic) -->

        while (currentNPenalty > 0 && bases[currentNPenalty] != 'N') {
            final int baseIndex = BaseUtils.simpleBaseToBaseIndex(bases[currentNPenalty]);
            currentKey |= (baseIndex << offset);
            offset -= 2;
            currentNPenalty--;
        }

Minimal Command (test.bam attached - gzipped to allow the attachment to work) -->

java -jar GenomeAnalysisTK.jar -T BaseRecalibrator -I test.bam -o test.table -R GATK_Bundle_Build38/Homo_sapiens_assembly38.fasta --knownSites GATK_Bundle_Build38/dbsnp_146.hg38.vcf.gz

Error Message -->

java.lang.ArrayIndexOutOfBoundsException: -1
    at org.broadinstitute.gatk.engine.recalibration.covariates.ContextCovariate.contextWith(ContextCovariate.java:184)
    at org.broadinstitute.gatk.engine.recalibration.covariates.ContextCovariate.recordValues(ContextCovariate.java:100)
    at org.broadinstitute.gatk.engine.recalibration.RecalUtils.computeCovariates(RecalUtils.java:926)
    at org.broadinstitute.gatk.engine.recalibration.RecalUtils.computeCovariates(RecalUtils.java:906)
    at org.broadinstitute.gatk.tools.walkers.bqsr.BaseRecalibrator.map(BaseRecalibrator.java:286)
    at org.broadinstitute.gatk.tools.walkers.bqsr.BaseRecalibrator.map(BaseRecalibrator.java:156)
    at org.broadinstitute.gatk.engine.traversals.TraverseReadsNano$TraverseReadsMap.apply(TraverseReadsNano.java:228)
    at org.broadinstitute.gatk.engine.traversals.TraverseReadsNano$TraverseReadsMap.apply(TraverseReadsNano.java:216)
    at org.broadinstitute.gatk.utils.nanoScheduler.NanoScheduler.executeSingleThreaded(NanoScheduler.java:274)
    at org.broadinstitute.gatk.utils.nanoScheduler.NanoScheduler.execute(NanoScheduler.java:245)
    at org.broadinstitute.gatk.engine.traversals.TraverseReadsNano.traverse(TraverseReadsNano.java:102)
    at org.broadinstitute.gatk.engine.traversals.TraverseReadsNano.traverse(TraverseReadsNano.java:56)
    at org.broadinstitute.gatk.engine.executive.LinearMicroScheduler.execute(LinearMicroScheduler.java:107)
    at org.broadinstitute.gatk.engine.GenomeAnalysisEngine.execute(GenomeAnalysisEngine.java:323)
    at org.broadinstitute.gatk.engine.CommandLineExecutable.execute(CommandLineExecutable.java:123)
    at org.broadinstitute.gatk.utils.commandline.CommandLineProgram.start(CommandLineProgram.java:256)
    at org.broadinstitute.gatk.utils.commandline.CommandLineProgram.start(CommandLineProgram.java:158)
    at org.broadinstitute.gatk.engine.CommandLineGATK.main(CommandLineGATK.java:108)
##### ERROR ------------------------------------------------------------------------------------------
##### ERROR A GATK RUNTIME ERROR has occurred (version 3.8-0-ge9d806836):
##### 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 https://software.broadinstitute.org/gatk
##### ERROR
##### ERROR MESSAGE: -1
##### ERROR ------------------------------------------------------------------------------------------

Viewing all articles
Browse latest Browse all 12345

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>