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!

Patch for null value error on DepthPerAlleleBySample indel annotation

chapmanbchapmanb Boston, MAMember ✭✭
edited August 2012 in Ask the GATK team

When calculating DepthPerAlleleBySample for some indels, I'm getting
an error due to passing a stringified null value to Allele creation. Here are
small, reproducible BAM and VCF files:

Running:

$ java -jar gatk/dist/GenomeAnalysisTK.jar -T VariantAnnotator -R GRCh37.fa -I ug_nullbase.bam 
   --variant ug_nullbase-called.vcf -L ug_nullbase-called.vcf -A DepthPerAlleleBySample -o tmp.vcf

Results in:

##### ERROR ------------------------------------------------------------------------------------------
##### ERROR stack trace 
java.lang.IllegalArgumentException: Unexpected base in allele bases 'TNull'
        at org.broadinstitute.sting.utils.variantcontext.Allele.<init>(Allele.java:115)
        at org.broadinstitute.sting.utils.variantcontext.Allele.create(Allele.java:167)
        at org.broadinstitute.sting.utils.variantcontext.Allele.create(Allele.java:272)
        at org.broadinstitute.sting.gatk.walkers.annotator.DepthPerAlleleBySample.annotateIndel(DepthPerAlleleBySample.java:91)
        at org.broadinstitute.sting.gatk.walkers.annotator.DepthPerAlleleBySample.annotate(DepthPerAlleleBySample.java:52)
        at org.broadinstitute.sting.gatk.walkers.annotator.VariantAnnotatorEngine.annotateGenotypes(VariantAnnotatorEngine.java:282)
        at org.broadinstitute.sting.gatk.walkers.annotator.VariantAnnotatorEngine.annotateContext(VariantAnnotatorEngine.java:201)
        at org.broadinstitute.sting.gatk.walkers.annotator.VariantAnnotator.map(VariantAnnotator.java:314)
        at org.broadinstitute.sting.gatk.walkers.annotator.VariantAnnotator.map(VariantAnnotator.java:80)
        at org.broadinstitute.sting.gatk.traversals.TraverseLoci.traverse(TraverseLoci.java:65)
        at org.broadinstitute.sting.gatk.traversals.TraverseLoci.traverse(TraverseLoci.java:18)
        at org.broadinstitute.sting.gatk.executive.LinearMicroScheduler.execute(LinearMicroScheduler.java:62)
        at org.broadinstitute.sting.gatk.GenomeAnalysisEngine.execute(GenomeAnalysisEngine.java:265)
        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)
##### ERROR ------------------------------------------------------------------------------------------
##### ERROR A GATK RUNTIME ERROR has occurred (version 2.1-4-g63aa084):
##### ERROR
##### ERROR Please visit the wiki 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 http://www.broadinstitute.org/gatk
##### ERROR
##### ERROR MESSAGE: Unexpected base in allele bases 'TNull'
##### ERROR ------------------------------------------------------------------------------------------

This patch explicitly checks for a null allele from PileupEvent.getEventBases and resolves the problem:

https://gist.github.com/3487411

Please let me know if I can provide any other information. Thanks much.

Best Answer

Answers

Sign In or Register to comment.