Check out the vcf-vep command from the fuc package I wrote:
If you want to also exclude variants that do not have AF information:
$ fuc vcf-vep in.vcf "gnomAD_AF < 0.001" > out.vcf
If you want to treat variants without AF information as having AF of zero:
$ fuc vcf-vep in.vcf "gnomAD_AF < 0.001" --as_zero > out.vcf
For more help:
$ fuc vcf-vep -h
usage: fuc vcf-vep [-h] [--opposite] [--as_zero] vcf expr
This command will filter a VCF file annotated by Ensemble VEP.
Usage examples:
$ fuc vcf-vep in.vcf "SYMBOL == 'TP53'" > out.vcf
$ fuc vcf-vep in.vcf "SYMBOL != 'TP53'" > out.vcf
$ fuc vcf-vep in.vcf "SYMBOL == 'TP53'" --opposite > out.vcf
$ fuc vcf-vep in.vcf "Consequence in ['splice_donor_variant', 'stop_gained']" > out.vcf
$ fuc vcf-vep in.vcf "(SYMBOL == 'TP53') and (Consequence.str.contains('stop_gained'))" > out.vcf
$ fuc vcf-vep in.vcf "gnomAD_AF < 0.001" > out.vcf
$ fuc vcf-vep in.vcf "gnomAD_AF < 0.001" --as_zero > out.vcf
Positional arguments:
vcf VCF file annotated by Ensemble VEP.
expr Query expression to evaluate.
Optional arguments:
-h, --help Show this help message and exit.
--opposite Use this flag to return only records that don't meet the said criteria.
--as_zero Use this flag to treat missing values as zero instead of NaN.
In order to filter a VCF by a particular INFO tag, it must be described in the VCF file header and you must query exactly as it is written both in the header and in the INFO column. Maybe you're trying to filter gnomAD_AF but your writting gnomADe_AF instead.
Yes, I have tried with both and also checked many times that it is written exactly the same as in headers and INFO column.