VariantEffectFilter implements VariantFilter { @Override public FilterResult runFilter(VariantEvaluation variantEvaluation) { if (variantEvaluation.isWhiteListed()) { return PASS; } VariantEffect effect = variantEvaluation.getVariantEffect(); if (offTargetVariantTypes.contains(effect)) { return FAIL; } return PASS; } VariantEffectFilter(Set<VariantEffect> notWanted); Set<VariantEffect> getOffTargetVariantTypes(); @Override FilterType getFilterType(); @Override FilterResult runFilter(VariantEvaluation variantEvaluation); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }
@Test public void testMissenseVariantPassesFilter() { FilterResult filterResult = instance.runFilter(missensePassesFilter); FilterTestHelper.assertPassed(filterResult); }
@Test public void testSynonymousVariantFailsFilter() { FilterResult filterResult = instance.runFilter(synonymousFailsFilter); FilterTestHelper.assertFailed(filterResult); }
@Test void testWhiteListedSynonymousVariantPasses() { VariantEvaluation whitListedSynonymousVariant = testVariantBuilder() .variantEffect(VariantEffect.SYNONYMOUS_VARIANT) .whiteListed(true) .build(); FilterResult filterResult = instance.runFilter(whitListedSynonymousVariant); FilterTestHelper.assertPassed(filterResult); }