broadinstitute / gatk

Official code repository for GATK versions 4 and up
https://software.broadinstitute.org/gatk
Other
1.68k stars 587 forks source link

[BUG?] GATK4.1.3.0 Mutect2 enable-all-annotations option error #6314

Closed xiucz closed 4 years ago

xiucz commented 4 years ago

Hi, When I used the enable-all-annotations option to run Mutect2, it failed.

~/software/gatktools/gatk-4.1.3.0/gatk Mutect2 \
-R ~/database/hg19/gatk_bundle/ucsc.hg19.fasta \
-I sample.recalibrated.bam -tumor sample -L tmp.bed \
--germline-resource ~/af-only-gnomad.raw.sites.hg19.vcf.gz  \
-O  gatk4p1p3p0.enable-all-annotations.vcf --enable-all-annotations true

Error logs:

                     ...
15:52:06.727 INFO  Mutect2 - Shutting down engine
[December 12, 2019 3:52:06 PM CST] org.broadinstitute.hellbender.tools.walkers.mutect.Mutect2 done. Elapsed time: 0.17 minutes.
Runtime.totalMemory()=2494038016
org.broadinstitute.hellbender.exceptions.GATKException: Reference coordinate corresponds to a non-existent base in the read. This should never happen -- check read with alignment start: 6257722  and cigar: 5H134M
        at org.broadinstitute.hellbender.utils.read.ReadUtils.getReadCoordinateForReferenceCoordinate(ReadUtils.java:830)
        at org.broadinstitute.hellbender.utils.read.ReadUtils.getReadCoordinateForReferenceCoordinate(ReadUtils.java:761)
        at org.broadinstitute.hellbender.utils.read.ReadUtils.getReadCoordinateForReferenceCoordinateUpToEndOfRead(ReadUtils.java:679)
        at org.broadinstitute.hellbender.tools.walkers.annotator.BaseQualityRankSumTest.getReadBaseQuality(BaseQualityRankSumTest.java:43)
        at org.broadinstitute.hellbender.tools.walkers.annotator.allelespecific.AS_BaseQualityRankSumTest.getElementForRead(AS_BaseQualityRankSumTest.java:57)
        at org.broadinstitute.hellbender.tools.walkers.annotator.RankSumTest.getElementForRead(RankSumTest.java:108)
        at org.broadinstitute.hellbender.tools.walkers.annotator.RankSumTest.fillQualsFromLikelihood(RankSumTest.java:86)
        at org.broadinstitute.hellbender.tools.walkers.annotator.allelespecific.AS_RankSumTest.annotate(AS_RankSumTest.java:47)
        at org.broadinstitute.hellbender.tools.walkers.annotator.VariantAnnotatorEngine.annotateContext(VariantAnnotatorEngine.java:278)
        at org.broadinstitute.hellbender.tools.walkers.mutect.SomaticGenotypingEngine.callMutations(SomaticGenotypingEngine.java:168)
        at org.broadinstitute.hellbender.tools.walkers.mutect.Mutect2Engine.callRegion(Mutect2Engine.java:250)
        at org.broadinstitute.hellbender.tools.walkers.mutect.Mutect2.apply(Mutect2.java:320)
        at org.broadinstitute.hellbender.engine.AssemblyRegionWalker.processReadShard(AssemblyRegionWalker.java:308)
        at org.broadinstitute.hellbender.engine.AssemblyRegionWalker.traverse(AssemblyRegionWalker.java:281)
        at org.broadinstitute.hellbender.engine.GATKTool.doWork(GATKTool.java:1048)
        at org.broadinstitute.hellbender.cmdline.CommandLineProgram.runTool(CommandLineProgram.java:139)
        at org.broadinstitute.hellbender.cmdline.CommandLineProgram.instanceMainPostParseArgs(CommandLineProgram.java:191)
        at org.broadinstitute.hellbender.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:210)
        at org.broadinstitute.hellbender.Main.runCommandLineProgram(Main.java:162)
        at org.broadinstitute.hellbender.Main.mainEntry(Main.java:205)
        at org.broadinstitute.hellbender.Main.main(Main.java:291)
davidbenjamin commented 4 years ago

@xiucz I found a few bugs in our ReadUtils methods to identify read coordinates corresponding to a reference position. This needs to be fixed across the GATK. I'm working on it now.