Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
JEXLMap evaluateExpression's un-overridable default behavior restricts user's options. #697
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
SHuang-Broad commentedSep 6, 2016
Verify
Can you see anything in the logs?
Make sure your issue is not already in the htsjdk issue tracker
Answer: At the time of ticket opening (2016-09-06), there's another fix that tries to remedy a related problem. But that fix doesn't change any logic, so couldn't solve this problem.
Subject of the issue
Summary:
JEXLMapdecides for user that records with missing annotation, by which the expression works, is associated with afalsevalue.See below for code block causing the bug.
Currently, one of the use case is in GATK's
VariantFiltrationtool, which filters variants and/or genotypes/samples based on user provided cmd line filter expressions.In particular, the expected default behavior is that variants or genotypes which has missing data for the specific annotation the filter works on should be marked as PASSing unless user explicitly turn on a flag
missingValuesInExpressionsShouldEvaluateAsFailingso that such variants or genotypes will be marked as FAILing.Your environment
Steps to reproduce
See code block below. In particular, the exception handling part when the error message contains a substring "undefined variable".
Expected behaviour
Users should be given the option to handle exceptions, based on the type of exception thrown.
This requires better documentation on involved classes and methods.
Actual behaviour
For any record that misses the annotation that the expression acts on, the library decides for the user that the record should evaluate to
false. And user has no way of knowing the cause.