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!

ERROR: Reference length must be at most one base shorter than location size

skblazerskblazer Member
edited August 2012 in Ask the GATK team

Hi,

When I run HaplotypeCaller, I found error as below:

java -Xmx32g -jar /tools/GenomeAnalysisTK-2.0-39-gd091f72/GenomeAnalysisTK.jar -T HaplotypeCaller -R ref.fasta -dcov 100 --heterozygosity 0.009 --indel_heterozygosity 0.001 -U -S SILENT -rf BadCigar -stand_call_conf 30 -stand_emit_conf 10 -baq CALCULATE_AS_NECESSARY -L intervals/scf_parts.list -o outgroup.vcf -I outgroup_sample1.bam -I outgroup_sample2.bam -I outgroup_sample3.bam

ERROR stack trace

java.lang.IllegalArgumentException: Badly formed variant context at location 485438 in contig scaffold49. Reference length must be at most one base shorter than location size
at org.broadinstitute.sting.utils.codecs.vcf.VCFAlleleClipper.needsPadding(VCFAlleleClipper.java:266)
at org.broadinstitute.sting.utils.codecs.vcf.VCFAlleleClipper.createVariantContextWithPaddedAlleles(VCFAlleleClipper.java:289)
at org.broadinstitute.sting.utils.variantcontext.VariantContextUtils.simpleMerge(VariantContextUtils.java:496)
at org.broadinstitute.sting.gatk.walkers.haplotypecaller.GenotypingEngine.assignGenotypeLikelihoodsAndCallIndependentEvents(GenotypingEngine.java:259)
at org.broadinstitute.sting.gatk.walkers.haplotypecaller.HaplotypeCaller.map(HaplotypeCaller.java:418)
at org.broadinstitute.sting.gatk.walkers.haplotypecaller.HaplotypeCaller.map(HaplotypeCaller.java:104)
at org.broadinstitute.sting.gatk.traversals.TraverseActiveRegions.processActiveRegion(TraverseActiveRegions.java:246)
at org.broadinstitute.sting.gatk.traversals.TraverseActiveRegions.callWalkerMapOnActiveRegions(TraverseActiveRegions.java:202)
at org.broadinstitute.sting.gatk.traversals.TraverseActiveRegions.processActiveRegions(TraverseActiveRegions.java:177)
at org.broadinstitute.sting.gatk.traversals.TraverseActiveRegions.traverse(TraverseActiveRegions.java:134)
at org.broadinstitute.sting.gatk.traversals.TraverseActiveRegions.traverse(TraverseActiveRegions.java:27)
at org.broadinstitute.sting.gatk.executive.LinearMicroScheduler.execute(LinearMicroScheduler.java:62)
at org.broadinstitute.sting.gatk.GenomeAnalysisEngine.execute(GenomeAnalysisEngine.java:269)
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)

It's unclear to me that reference length and location size stand for what here.

It's unexpected that when I used the same command to load each of the sample-level BAM file separately, HaplotypeCaller did NOT report this error. This only happened when I feed all the three sample-level BAM files simultaneously.

Thanks,
SK

Best Answer

  • rpoplinrpoplin ✭✭✭
    Accepted Answer

    Hi there,

    I'm glad to hear you are trying out the HaplotypeCaller. We believe this is fixed in the latest developmental version of the code. You should see the fix in version 2.1 of the GATK which will be released today.

    Thanks for your help,

Answers

  • rpoplinrpoplin Member ✭✭✭
    Accepted Answer

    Hi there,

    I'm glad to hear you are trying out the HaplotypeCaller. We believe this is fixed in the latest developmental version of the code. You should see the fix in version 2.1 of the GATK which will be released today.

    Thanks for your help,

Sign In or Register to comment.