Closed edg1983 closed 3 years ago
for flags, you need:
--info '!(("SegDup" in INFO') || ("LowComplexity" in INFO))'
Great thanks! It worked perfectly and no errors reported. I got confused because using any of the expressions reported above the output VCF was created correctly, but only the first tag in the expression got removed.
Yeah. I think you might need parenthesis. It could work how you expected as that's how javascript would work, but I have checks in place so that accessing an absent attribute triggers a warning. This generally helps avoid problems, but in cases like this it's more of a PITA.
Hi Brent,
I want to use slivar for segregation analysis and I want to add a filter based on the INFO field using the
--info
option. However, it is not clear to me how to set up the expression in case of a flag tag. In my case, I have 2 tagsLowComplexity
andSegDup
that are present and I want to remove variants annotated with any of these 2 flags from my results. So I've tried using--info 'INFO.LowComplexity == false && INFO.SegDup == false'
--info 'INFO.LowComplexity == 0 && INFO.SegDup == 0'
--info '!INFO.LowComplexity && !INFO.SegDup'
However, with all the above I get a lot of errors like this
I suppose this can be fine since the flags are missing for many vars. Maybe better to not have this error repeated a lot of times when a flag tag is involved. However, even if the output VCF is generated correctly, only the first (LowComplexity) of the 2 tags is actually removed. What I mean is that if I change the order in the above expression and use
--info 'INFO.SegDup == false && INFO.LowComplexity == false'
I get this errorAnd now only the SegDup tag is removed from the output.
Can you suggest the best way to filter for flag tags?