Closed wwgordon closed 1 year ago
I think you can flip the quotes your first attempt. You had:
--info "variant.FILTER == 'PASS' \
&& INFO.highest_impact_order < ImpactOrder.synonymous \
&& (\!('AF_popmax' in INFO) || INFO.AF_popmax <= 0.005)" \
you may instead try outer single quotes:
--info 'variant.FILTER == "PASS" \
&& INFO.highest_impact_order < ImpactOrder.synonymous \
&& (!("AF_popmax" in INFO) || INFO.AF_popmax <= 0.005)'
by the way, if you annotate with slivar (or echtvar) it will set missing values to -1 to avoid this exact difficulty.
--info 'variant.FILTER == "PASS" \ && INFO.highest_impact_order < ImpactOrder.synonymous \ && (!("AF_popmax" in INFO) || INFO.AF_popmax <= 0.005)'
This works, with double quotes the escaped returns must be removed (i.e. everything must be one line). Perfectly fine for us, thanks!
This follows #74 and #63.
I would like to filter on
AF_popmax
if it is present, and ignore it if it is missing:However it throws a warning everytime it comes across a missing value, and breaks out of the --info query, which can be seen by switching the order of expressions:
I was hoping I could use something akin to #74 but inverted:
But this seems to be a syntax error. Lastly, I tried a "nullish coalescing operator" but this also resulted in a syntax error:
Is there a way I could successfully make this query? I am a JavaScript novice.