diff --git a/protected/gatk-tools-protected/src/main/java/org/broadinstitute/gatk/tools/walkers/annotator/AS_QualByDepth.java b/protected/gatk-tools-protected/src/main/java/org/broadinstitute/gatk/tools/walkers/annotator/AS_QualByDepth.java index e4c806e6a..8df281d72 100644 --- a/protected/gatk-tools-protected/src/main/java/org/broadinstitute/gatk/tools/walkers/annotator/AS_QualByDepth.java +++ b/protected/gatk-tools-protected/src/main/java/org/broadinstitute/gatk/tools/walkers/annotator/AS_QualByDepth.java @@ -172,6 +172,8 @@ public class AS_QualByDepth extends InfoFieldAnnotation implements ReducibleAnno return null; final List standardDepth = getAlleleDepths(genotypes); + if (standardDepth == null) //all no-calls and homRefs + return null; //Parse the VC's allele-specific qual values List alleleQualObjList = vc.getAttributeAsList(GATKVCFConstants.AS_QUAL_KEY); diff --git a/protected/gatk-tools-protected/src/main/java/org/broadinstitute/gatk/tools/walkers/genotyper/GenotypingEngine.java b/protected/gatk-tools-protected/src/main/java/org/broadinstitute/gatk/tools/walkers/genotyper/GenotypingEngine.java index 0a0debff9..6c1b28cb2 100644 --- a/protected/gatk-tools-protected/src/main/java/org/broadinstitute/gatk/tools/walkers/genotyper/GenotypingEngine.java +++ b/protected/gatk-tools-protected/src/main/java/org/broadinstitute/gatk/tools/walkers/genotyper/GenotypingEngine.java @@ -210,7 +210,7 @@ public abstract class GenotypingEngine stratifiedContexts, diff --git a/protected/gatk-tools-protected/src/test/java/org/broadinstitute/gatk/tools/walkers/variantutils/GenotypeGVCFsIntegrationTest.java b/protected/gatk-tools-protected/src/test/java/org/broadinstitute/gatk/tools/walkers/variantutils/GenotypeGVCFsIntegrationTest.java index 049da9bba..2de0af25b 100644 --- a/protected/gatk-tools-protected/src/test/java/org/broadinstitute/gatk/tools/walkers/variantutils/GenotypeGVCFsIntegrationTest.java +++ b/protected/gatk-tools-protected/src/test/java/org/broadinstitute/gatk/tools/walkers/variantutils/GenotypeGVCFsIntegrationTest.java @@ -612,6 +612,15 @@ public class GenotypeGVCFsIntegrationTest extends WalkerTest { executeTest("testAlleleSpecificAnnotations_elevenSamples", spec); } + @Test + public void testMonomorphicVCwithAlt() { + final String cmd = "-T GenotypeGVCFs -R " + b37KGReference + " -G AS_Standard -o %s --no_cmdline_in_header --disableDithering -V " + + privateTestDir + "monomorphicGVCwithAlt.vcf"; + final WalkerTestSpec spec = new WalkerTestSpec(cmd, 1, Collections.singletonList("080951cdb5d4903dd58b1e753b9378d5")); + spec.disableShadowBCF(); + executeTest("testAlleleSpecificAnnotations", spec); + } + @Test public void testFractionInformativeReads() { final String cmd = "-T GenotypeGVCFs -R " + b37KGReference + " -G AS_Standard -o %s --no_cmdline_in_header -A FractionInformativeReads --disableDithering -V " diff --git a/public/gatk-tools-public/src/main/java/org/broadinstitute/gatk/tools/walkers/annotator/VariantAnnotatorEngine.java b/public/gatk-tools-public/src/main/java/org/broadinstitute/gatk/tools/walkers/annotator/VariantAnnotatorEngine.java index d62029fb3..e8394cec4 100644 --- a/public/gatk-tools-public/src/main/java/org/broadinstitute/gatk/tools/walkers/annotator/VariantAnnotatorEngine.java +++ b/public/gatk-tools-public/src/main/java/org/broadinstitute/gatk/tools/walkers/annotator/VariantAnnotatorEngine.java @@ -357,9 +357,9 @@ public class VariantAnnotatorEngine { final Map annotationsFromCurrentType = currentASannotation.finalizeRawData(vc, originalVC); if ( annotationsFromCurrentType != null ) { infoAnnotations.putAll(annotationsFromCurrentType); - //clean up raw annotation data after annotations are finalized - infoAnnotations.remove(currentASannotation.getRawKeyName()); } + //clean up raw annotation data after annotations are finalized + infoAnnotations.remove(currentASannotation.getRawKeyName()); } // generate a new annotated VC