From a1bd6af5bff55a4ce2556d9ac0916b0f83a8755c Mon Sep 17 00:00:00 2001 From: Megan Shand Date: Thu, 3 Feb 2022 14:07:45 -0500 Subject: [PATCH 1/3] test for PossibleDeNovo annotation with VCF without PLs --- .../tools/walkers/annotator/PossibleDeNovoUnitTest.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/test/java/org/broadinstitute/hellbender/tools/walkers/annotator/PossibleDeNovoUnitTest.java b/src/test/java/org/broadinstitute/hellbender/tools/walkers/annotator/PossibleDeNovoUnitTest.java index d309c6b189e..0cfb9b24b45 100644 --- a/src/test/java/org/broadinstitute/hellbender/tools/walkers/annotator/PossibleDeNovoUnitTest.java +++ b/src/test/java/org/broadinstitute/hellbender/tools/walkers/annotator/PossibleDeNovoUnitTest.java @@ -117,6 +117,13 @@ public Object[][] deNovo() { tests.add(new Object[]{gNo, gNo, g11, false}); tests.add(new Object[]{gNo, gNo, gNo, false}); + final Genotype g00NoPl = new GenotypeBuilder("2", homRef).DP(10).GQ(GQ30).make(); + final Genotype g01NoPl = new GenotypeBuilder("1", het).DP(10).GQ(GQ30).make(); + final Genotype g11NoPl = new GenotypeBuilder("3", homVar).DP(10).GQ(GQ30).make(); + + tests.add(new Object[]{g00NoPl, g01NoPl, g11NoPl, false}); + tests.add(new Object[]{g00NoPl, g00NoPl, g01NoPl, true}); + return tests.toArray(new Object[][]{}); } From 8f3fc428f420220c1696a25566df3490cd74436a Mon Sep 17 00:00:00 2001 From: Megan Shand Date: Thu, 3 Feb 2022 14:15:43 -0500 Subject: [PATCH 2/3] fix --- .../tools/walkers/annotator/PossibleDeNovo.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/org/broadinstitute/hellbender/tools/walkers/annotator/PossibleDeNovo.java b/src/main/java/org/broadinstitute/hellbender/tools/walkers/annotator/PossibleDeNovo.java index 1e97a4b6f93..6f38f12438d 100644 --- a/src/main/java/org/broadinstitute/hellbender/tools/walkers/annotator/PossibleDeNovo.java +++ b/src/main/java/org/broadinstitute/hellbender/tools/walkers/annotator/PossibleDeNovo.java @@ -105,7 +105,7 @@ public Map annotate(final ReferenceContext ref, final List lowConfDeNovoChildren = new ArrayList<>(); for (final Trio trio : trioSet) { if (vc.isBiallelic() && - PossibleDeNovo.contextHasTrioLikelihoods(vc, trio) && + PossibleDeNovo.contextHasTrioGQs(vc, trio) && mendelianViolation.isViolation(trio.getMother(), trio.getFather(), trio.getChild(), vc) && mendelianViolation.getParentsRefRefChildHet() > 0) { @@ -135,14 +135,14 @@ public Map annotate(final ReferenceContext ref, return attributeMap; } - private static boolean contextHasTrioLikelihoods(final VariantContext vc, final Trio trio) { + static boolean contextHasTrioGQs(final VariantContext vc, final Trio trio) { final String mom = trio.getMaternalID(); final String dad = trio.getPaternalID(); final String kid = trio.getChildID(); - return (!mom.isEmpty() && vc.hasGenotype(mom) && vc.getGenotype(mom).hasLikelihoods()) - && (!dad.isEmpty() && vc.hasGenotype(dad) && vc.getGenotype(dad).hasLikelihoods()) - && (!kid.isEmpty() && vc.hasGenotype(kid) && vc.getGenotype(kid).hasLikelihoods()); + return (!mom.isEmpty() && vc.hasGenotype(mom) && vc.getGenotype(mom).hasGQ()) + && (!dad.isEmpty() && vc.hasGenotype(dad) && vc.getGenotype(dad).hasGQ()) + && (!kid.isEmpty() && vc.hasGenotype(kid) && vc.getGenotype(kid).hasGQ()); } } From d5f94fbdd9c74ce7594f1ad5622cd53b48b8c636 Mon Sep 17 00:00:00 2001 From: Megan Shand Date: Thu, 3 Feb 2022 14:16:57 -0500 Subject: [PATCH 3/3] oops dropped a private --- .../hellbender/tools/walkers/annotator/PossibleDeNovo.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/broadinstitute/hellbender/tools/walkers/annotator/PossibleDeNovo.java b/src/main/java/org/broadinstitute/hellbender/tools/walkers/annotator/PossibleDeNovo.java index 6f38f12438d..c03fc8549f6 100644 --- a/src/main/java/org/broadinstitute/hellbender/tools/walkers/annotator/PossibleDeNovo.java +++ b/src/main/java/org/broadinstitute/hellbender/tools/walkers/annotator/PossibleDeNovo.java @@ -135,7 +135,7 @@ public Map annotate(final ReferenceContext ref, return attributeMap; } - static boolean contextHasTrioGQs(final VariantContext vc, final Trio trio) { + private static boolean contextHasTrioGQs(final VariantContext vc, final Trio trio) { final String mom = trio.getMaternalID(); final String dad = trio.getPaternalID(); final String kid = trio.getChildID();