From 5eaf8002810237e3dfa67cf72a619a39c3cb45fd Mon Sep 17 00:00:00 2001 From: Christopher Hartl Date: Wed, 9 Nov 2011 11:22:20 -0500 Subject: [PATCH 1/3] a --- .../sting/gatk/walkers/annotator/MVLikelihoodRatio.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/MVLikelihoodRatio.java b/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/MVLikelihoodRatio.java index 8da64608f..795c430bf 100755 --- a/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/MVLikelihoodRatio.java +++ b/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/MVLikelihoodRatio.java @@ -33,8 +33,11 @@ public class MVLikelihoodRatio extends InfoFieldAnnotation implements Experiment public Map annotate(RefMetaDataTracker tracker, AnnotatorCompatibleWalker walker, ReferenceContext ref, Map stratifiedContexts, VariantContext vc) { if ( mendelianViolation == null ) { - if ( walker instanceof VariantAnnotator && ((VariantAnnotator) walker).familyStr != null) { - mendelianViolation = new MendelianViolation(((VariantAnnotator)walker).familyStr, ((VariantAnnotator)walker).minGenotypeQualityP ); + if ( walker instanceof VariantAnnotator) { + if ( ((VariantAnnotator) walker).familyStr != null ) + mendelianViolation = new MendelianViolation(((VariantAnnotator)walker).familyStr, ((VariantAnnotator)walker).minGenotypeQualityP ); + else + return new HashMap(); } else { throw new UserException("Mendelian violation annotation can only be used from the Variant Annotator"); From d3a533b82e29d39d32af2c3a6992ef0a466ff09a Mon Sep 17 00:00:00 2001 From: Christopher Hartl Date: Wed, 9 Nov 2011 11:22:26 -0500 Subject: [PATCH 2/3] Revert "a" This reverts commit 1175f50ddbf389f5da74d27dc725596582ae15af. --- .../sting/gatk/walkers/annotator/MVLikelihoodRatio.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/MVLikelihoodRatio.java b/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/MVLikelihoodRatio.java index 795c430bf..8da64608f 100755 --- a/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/MVLikelihoodRatio.java +++ b/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/MVLikelihoodRatio.java @@ -33,11 +33,8 @@ public class MVLikelihoodRatio extends InfoFieldAnnotation implements Experiment public Map annotate(RefMetaDataTracker tracker, AnnotatorCompatibleWalker walker, ReferenceContext ref, Map stratifiedContexts, VariantContext vc) { if ( mendelianViolation == null ) { - if ( walker instanceof VariantAnnotator) { - if ( ((VariantAnnotator) walker).familyStr != null ) - mendelianViolation = new MendelianViolation(((VariantAnnotator)walker).familyStr, ((VariantAnnotator)walker).minGenotypeQualityP ); - else - return new HashMap(); + if ( walker instanceof VariantAnnotator && ((VariantAnnotator) walker).familyStr != null) { + mendelianViolation = new MendelianViolation(((VariantAnnotator)walker).familyStr, ((VariantAnnotator)walker).minGenotypeQualityP ); } else { throw new UserException("Mendelian violation annotation can only be used from the Variant Annotator"); From 11abb4f9d1173992d0576ee04db4c7c7cdaf5341 Mon Sep 17 00:00:00 2001 From: Christopher Hartl Date: Wed, 9 Nov 2011 11:25:28 -0500 Subject: [PATCH 3/3] Better error message. --- .../sting/gatk/walkers/annotator/MVLikelihoodRatio.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/MVLikelihoodRatio.java b/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/MVLikelihoodRatio.java index 8da64608f..bd0d4e3fb 100755 --- a/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/MVLikelihoodRatio.java +++ b/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/MVLikelihoodRatio.java @@ -37,7 +37,7 @@ public class MVLikelihoodRatio extends InfoFieldAnnotation implements Experiment mendelianViolation = new MendelianViolation(((VariantAnnotator)walker).familyStr, ((VariantAnnotator)walker).minGenotypeQualityP ); } else { - throw new UserException("Mendelian violation annotation can only be used from the Variant Annotator"); + throw new UserException("Mendelian violation annotation can only be used from the Variant Annotator, and must be provided a valid Family String file (-family) on the command line."); } }