From 31fc64f82cc5fc87cc4764f4ce05c0f53ea00a76 Mon Sep 17 00:00:00 2001 From: Laura Gauthier Date: Mon, 14 Mar 2016 13:17:29 -0400 Subject: [PATCH] To address weird case with all hom-refs, but alt allele is present, skip AS_QD for all-ref sites and remove raw annotations whether or not they can be successfully finalized --- .../gatk/tools/walkers/annotator/AS_QualByDepth.java | 2 ++ .../gatk/tools/walkers/annotator/VariantAnnotatorEngine.java | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) 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/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