To celebrate the release of GATK 4.0, we are giving away free credits for running the GATK4 Best Practices pipelines in FireCloud, our secure online analysis portal. It’s first come first serve, so sign up now to claim your free credits worth $250. Sponsored by Google Cloud. Learn more at

NegativeArraySizeException in GATK 3.0.0 / Java7

I was working with FastaAlternateReferenceMaker today. I wanted to use it on two samples. The first sample worked fine. The second sample came up with an error about a few REF values not conforming (e.g. :A) in the vcf. I wrote a script to correct the errors and remove the : from the vcf file. I tried to run it again, but received memory allocation errors. So, I dealt with that and am now allocating 6g for a 15G VCF and a 188M fasta reference. I got it running (I think) and then started getting the NegativeArraySizeException java error. I saw this had come up as a bug in earlier versions of GATK, but it seemed like it had been resolved...perhaps not? Anyhow, this 'quick little run' has taken up the better part of my day and I would be super greatful for some assistance troubleshooting this problem.

$ java -Xmx6g -jar ../../shays/GATK/GenomeAnalysisTK.jar -l ERROR -R ../up/chrom6.2.fa -T FastaAlternateReferenceMaker -o D-chr6.cons.fa --variant D-c6.vcf


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

at org.broad.tribble.readers.AsciiLineReader.readLine(
at org.broad.tribble.readers.AsciiLineReader.readLine(
at org.broadinstitute.variant.vcf.VCFCodec.readHeader(
at org.broad.tribble.AsciiFeatureCodec.readHeader(
at org.broad.tribble.index.IndexFactory$FeatureIterator.readHeader(
at org.broad.tribble.index.IndexFactory$FeatureIterator.(
at org.broad.tribble.index.IndexFactory.createDynamicIndex(
at org.broadinstitute.sting.gatk.refdata.tracks.RMDTrackBuilder.createIndexInMemory(
at org.broadinstitute.sting.gatk.refdata.tracks.RMDTrackBuilder.loadIndex(
at org.broadinstitute.sting.gatk.refdata.tracks.RMDTrackBuilder.getFeatureSource(
at org.broadinstitute.sting.gatk.refdata.tracks.RMDTrackBuilder.createInstanceOfTrack(
at org.broadinstitute.sting.gatk.datasources.rmd.ReferenceOrderedQueryDataPool.(
at org.broadinstitute.sting.gatk.datasources.rmd.ReferenceOrderedDataSource.(
at org.broadinstitute.sting.gatk.GenomeAnalysisEngine.getReferenceOrderedDataSources(
at org.broadinstitute.sting.gatk.GenomeAnalysisEngine.initializeDataSources(
at org.broadinstitute.sting.gatk.GenomeAnalysisEngine.execute(
at org.broadinstitute.sting.gatk.CommandLineExecutable.execute(
at org.broadinstitute.sting.commandline.CommandLineProgram.start(
at org.broadinstitute.sting.commandline.CommandLineProgram.start(
at org.broadinstitute.sting.gatk.CommandLineGATK.main(

ERROR ------------------------------------------------------------------------------------------
ERROR A GATK RUNTIME ERROR has occurred (version 2.5-2-gf57256b):
ERROR Please check the documentation guide 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
ERROR MESSAGE: Code exception (see stack trace for error itself)
ERROR ------------------------------------------------------------------------------------------


Sign In or Register to comment.