From a9694951d2ce5a42b48a22d88aa1ba04687d49d6 Mon Sep 17 00:00:00 2001 From: Laura Gauthier Date: Thu, 18 Dec 2014 13:28:56 -0500 Subject: [PATCH] Add error handling for genotypes that are called but have no PLs --- .../tools/walkers/variantutils/FamilyLikelihoodsUtils.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/protected/gatk-tools-protected/src/main/java/org/broadinstitute/gatk/tools/walkers/variantutils/FamilyLikelihoodsUtils.java b/protected/gatk-tools-protected/src/main/java/org/broadinstitute/gatk/tools/walkers/variantutils/FamilyLikelihoodsUtils.java index d5fc2a357..25678665a 100644 --- a/protected/gatk-tools-protected/src/main/java/org/broadinstitute/gatk/tools/walkers/variantutils/FamilyLikelihoodsUtils.java +++ b/protected/gatk-tools-protected/src/main/java/org/broadinstitute/gatk/tools/walkers/variantutils/FamilyLikelihoodsUtils.java @@ -107,9 +107,9 @@ public class FamilyLikelihoodsUtils { */ public void getUpdatedGenotypes(final VariantContext vc, final Genotype motherGenotype, final Genotype fatherGenotype, final Genotype childGenotype, final ArrayList updatedGenotypes){ //genotypes here can be no call - boolean fatherIsCalled = fatherGenotype != null && hasCalledGT(fatherGenotype.getType()); - boolean motherIsCalled = motherGenotype != null && hasCalledGT(motherGenotype.getType()); - boolean childIsCalled = childGenotype != null && hasCalledGT(childGenotype.getType()); + boolean fatherIsCalled = fatherGenotype != null && hasCalledGT(fatherGenotype.getType()) && fatherGenotype.hasLikelihoods(); + boolean motherIsCalled = motherGenotype != null && hasCalledGT(motherGenotype.getType()) && motherGenotype.hasLikelihoods(); + boolean childIsCalled = childGenotype != null && hasCalledGT(childGenotype.getType()) && childGenotype.hasLikelihoods(); //default to posteriors equal to likelihoods (flat priors) in case input genotypes are not called double[] uninformativeLikelihoods = {ONE_THIRD, ONE_THIRD, ONE_THIRD};