Adding a command-line argument to allow missing values to evaluate as false instead of true
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4854 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
9f3e56e487
commit
8ab4704b4c
|
|
@ -72,6 +72,9 @@ public class VariantFiltrationWalker extends RodWalker<Integer, Integer> {
|
||||||
@Argument(fullName="maskName", shortName="mask", doc="The text to put in the FILTER field if a 'mask' rod is provided and overlaps with a variant call; [default:'Mask']", required=false)
|
@Argument(fullName="maskName", shortName="mask", doc="The text to put in the FILTER field if a 'mask' rod is provided and overlaps with a variant call; [default:'Mask']", required=false)
|
||||||
protected String MASK_NAME = "Mask";
|
protected String MASK_NAME = "Mask";
|
||||||
|
|
||||||
|
@Argument(fullName="missingValuesInExpressionsShouldEvaluateAsFailing", doc="When evaluating the JEXL expressions, should missing values be considered failing the expression (by default they are considered passing)?", required=false)
|
||||||
|
protected Boolean FAIL_MISSING_VALUES = false;
|
||||||
|
|
||||||
// JEXL expressions for the filters
|
// JEXL expressions for the filters
|
||||||
List<VariantContextUtils.JexlVCMatchExp> filterExps;
|
List<VariantContextUtils.JexlVCMatchExp> filterExps;
|
||||||
List<VariantContextUtils.JexlVCMatchExp> genotypeFilterExps;
|
List<VariantContextUtils.JexlVCMatchExp> genotypeFilterExps;
|
||||||
|
|
@ -221,7 +224,11 @@ public class VariantFiltrationWalker extends RodWalker<Integer, Integer> {
|
||||||
try {
|
try {
|
||||||
if ( VariantContextUtils.match(vc, exp) )
|
if ( VariantContextUtils.match(vc, exp) )
|
||||||
filters.add(exp.name);
|
filters.add(exp.name);
|
||||||
} catch (Exception e) {} // do nothing; it just means that the expression isn't defined for this context
|
} catch (Exception e) {
|
||||||
|
// do nothing unless specifically asked to; it just means that the expression isn't defined for this context
|
||||||
|
if ( FAIL_MISSING_VALUES )
|
||||||
|
filters.add(exp.name);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
VariantContext filteredVC;
|
VariantContext filteredVC;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue