diff --git a/java/src/org/broadinstitute/sting/gatk/contexts/variantcontext/VariantContextUtils.java b/java/src/org/broadinstitute/sting/gatk/contexts/variantcontext/VariantContextUtils.java index c458e093b..ab51b0918 100755 --- a/java/src/org/broadinstitute/sting/gatk/contexts/variantcontext/VariantContextUtils.java +++ b/java/src/org/broadinstitute/sting/gatk/contexts/variantcontext/VariantContextUtils.java @@ -130,27 +130,29 @@ public class VariantContextUtils { } /** - * Returns true if exp match VC. See collection<> version for full docs. + * Returns true if exp match VC/g. See collection<> version for full docs. + * @param vc variant context * @param g genotype * @param exp expression * @return true if there is a match */ - public static boolean match(Genotype g, JexlVCMatchExp exp) { - return match(g,Arrays.asList(exp)).get(exp); + public static boolean match(VariantContext vc, Genotype g, JexlVCMatchExp exp) { + return match(vc,g,Arrays.asList(exp)).get(exp); } /** - * Matches each JexlVCMatchExp exp against the data contained in vc, and returns a map from these + * Matches each JexlVCMatchExp exp against the data contained in vc/g, and returns a map from these * expressions to true (if they matched) or false (if they didn't). This the best way to apply JEXL - * expressions to VariantContext records. Use initializeMatchExps() to create the list of JexlVCMatchExp + * expressions to VariantContext records/genotypes. Use initializeMatchExps() to create the list of JexlVCMatchExp * expressions. * + * @param vc variant context * @param g genotype * @param exps expressions * @return true if there is a match */ - public static Map match(Genotype g, Collection exps) { - return new JEXLMap(exps,g); + public static Map match(VariantContext vc, Genotype g, Collection exps) { + return new JEXLMap(exps,vc,g); } diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/filters/VariantFiltrationWalker.java b/java/src/org/broadinstitute/sting/gatk/walkers/filters/VariantFiltrationWalker.java index 18219ad72..f6cfaa37f 100755 --- a/java/src/org/broadinstitute/sting/gatk/walkers/filters/VariantFiltrationWalker.java +++ b/java/src/org/broadinstitute/sting/gatk/walkers/filters/VariantFiltrationWalker.java @@ -183,7 +183,7 @@ public class VariantFiltrationWalker extends RodWalker { Set filters = new LinkedHashSet(g.getFilters()); for ( VariantContextUtils.JexlVCMatchExp exp : genotypeFilterExps ) { - if ( VariantContextUtils.match(g, exp) ) + if ( VariantContextUtils.match(vc, g, exp) ) filters.add(exp.name); }