Why am I getting this error when running GetPileupSummaries?

The code:
gatk GetPileupSummaries -I V2.bam -V annot.vcf.gz -O getpileupsummaries.table

The error:

11:13:10.829 INFO GetPileupSummaries - Initializing engine
11:13:11.515 INFO FeatureManager - Using codec VCFCodec to read file file:///path.to file.vcf.gz
11:13:11.646 INFO GetPileupSummaries - Done initializing engine
11:13:11.647 INFO ProgressMeter - Starting traversal
11:13:11.648 INFO ProgressMeter - Current Locus Elapsed Minutes Variants Processed Variants/Minute
11:13:11.694 INFO GetPileupSummaries - Shutting down engine
[March 21, 2018 11:13:11 AM PDT] org.broadinstitute.hellbender.tools.walkers.contamination.GetPileupSummaries done. Elapsed time: 0.03 minutes.
Runtime.totalMemory()=1705508864
java.lang.ClassCastException: java.util.ArrayList cannot be cast to java.lang.String
at htsjdk.variant.variantcontext.CommonInfo.getAttributeAsDouble(CommonInfo.java:323)
at htsjdk.variant.variantcontext.VariantContext.getAttributeAsDouble(VariantContext.java:732)
at org.broadinstitute.hellbender.tools.walkers.contamination.GetPileupSummaries.alleleFrequencyInRange(GetPileupSummaries.java:197)
at org.broadinstitute.hellbender.tools.walkers.contamination.GetPileupSummaries.apply(GetPileupSummaries.java:172)
at org.broadinstitute.hellbender.engine.VariantWalkerBase.lambda$traverse$0(VariantWalkerBase.java:110)
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
at java.util.Iterator.forEachRemaining(Iterator.java:116)
at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
at org.broadinstitute.hellbender.engine.VariantWalkerBase.traverse(VariantWalkerBase.java:108)
at org.broadinstitute.hellbender.engine.GATKTool.doWork(GATKTool.java:893)
at org.broadinstitute.hellbender.cmdline.CommandLineProgram.runTool(CommandLineProgram.java:136)
at org.broadinstitute.hellbender.cmdline.CommandLineProgram.instanceMainPostParseArgs(CommandLineProgram.java:179)
at org.broadinstitute.hellbender.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:198)
at org.broadinstitute.hellbender.Main.runCommandLineProgram(Main.java:153)
at org.broadinstitute.hellbender.Main.mainEntry(Main.java:195)
at org.broadinstitute.hellbender.Main.main(Main.java:277)

Answers

  • shleeshlee CambridgeMember, Broadie, Moderator admin

    Hi @hg1891,

    Did the tool generate a getpileupsummaries.table file with contents?

    This error is likely due to a misclassification in the annot.vcf.gz header. The misclassification will be in the annotation or filter value type, as discussed here.

    You can check what are the expected annotation types in the GATK3 documentation on Annotation Modules, e.g. here. For example:

    INFO=<ID=AF,Number=A,Type=Float,Description="Allele Frequency, for each ALT allele, in the same order as listed">
    

    Here the AF annotation Type is a Float or decimal value. The error message:

    java.lang.ClassCastException: java.util.ArrayList cannot be cast to java.lang.String

    implies a String type is expected but your VCF specifies an ArrayList. Was annot.vcf.gz made with GATK?

Sign In or Register to comment.