Hi,
My VCF file is annotated with g1k frequency WHEN such a frequency is available.
I want to select all rare variants (with a frequency below a certain cutoff say 1%). Thus I want all lines where this condition is satisfied BUT I also need all the lines where there is no frequency annotation as these are also potential rare variants.
Does anyone know how to do this with bcftools expressions? I have tried but it would seem like bcftools does not provide a way of testing whether a tag is present in the INFO field.
Tim
I tried this and it does not work.
I think this syntax
can only be used for tags that are true flags ie that do not have a value. Such tags are defined in the header with Number=0 (number of values) to indicate that they do not have a value. In my case when the frequency is available it is a tag with a value, and when it is not available nothing appears.
I suppose in a way the frequency tag is being used partly as a true flag and partly not. Not my design, but the way it is implemented by several pieces of software.
Tim
I see. in the end, I would use my tool based on javascript: https://github.com/lindenb/jvarkit/wiki/VCFFilterJS see below.