I am using bcftools to filter variants from a VCF file. The variants from this VCF file have been annotated using ANNOVAR.
I would like to filter variants having a CADD score > 20 in a field named "CADD_phred" which has been created and annotated by ANNOVAR.
However, when the following command does not work:
bcftools view -i'CADD_phred>20' -Oz -o out.vcf.gz in.vcf.gz
I believe it is because the CADD_phred information has been stored as a string and does not contain numerical value. For example, I was able to remove the variants without CADD scores (stored as ".") using the
bcftools view -e'CADD_phred="."' command.
Is there any solution to convert string values to numerical values using bcftools?