This commit is contained in:
Christopher Hartl 2011-11-09 11:22:20 -05:00
parent 091229e4db
commit 5eaf800281
1 changed files with 5 additions and 2 deletions

View File

@ -33,8 +33,11 @@ public class MVLikelihoodRatio extends InfoFieldAnnotation implements Experiment
public Map<String, Object> annotate(RefMetaDataTracker tracker, AnnotatorCompatibleWalker walker, ReferenceContext ref, Map<String, AlignmentContext> 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<String,Object>();
}
else {
throw new UserException("Mendelian violation annotation can only be used from the Variant Annotator");