Open davidbenjamin opened 5 years ago
The code uses x == VCFConstants.MISSING_VALUE_v4
in a few places; all of these should instead use x.equals(VCFConstants.MISSING_VALUE_v4)
. (Casting to String
is a runtime error if x
is another type and equals()
doesn't care if you compare different types.)
There's some code duplication here and cases where it doesn't compare against MISSING_VALUE_v4
, it would be nice to clean up this code while doing this. E.g. getAttributeAsDouble()
and getAttributeAsDoubleList()
have the same code (almost) for converting to double
.
Here's the code for
CommonInfo::getAttributeAsDoubleList
Note that when parsing the vcf the
x
in this lambda has typeObject
, and therefore testingx == VCFConstants.MISSING_VALUE_v4
doesn't work i.e. it returnsfalse
even when the vcf has the missing field indicator "." To returntrue
int his case you would need((String) x).equals(VCFConstants.MISSING_VALUE_v4)
.@lbergelson This is causing a Mutect2 bug when users use their own gnomAD. I have a workaround but it adds extra vcf parsing to
isActive
.