brentp / vcfanno

annotate a VCF with other VCFs/BEDs/tabixed files
https://genomebiology.biomedcentral.com/articles/10.1186/s13059-016-0973-5
MIT License
357 stars 55 forks source link

Filtering variants by CADD value or nonsynonymous_SNV from annotated VCF file with Annovar #157

Closed alanmejiamaza closed 1 year ago

alanmejiamaza commented 1 year ago

Hi,

I am a newbie using Annovar and just encountered this. I have annotated a vcf file, following the instructions. I have noticed that CADD_phred has dots for some variants and numbers for others. CADD_phred=. CADD_phred=0.047 I think this is OK, as I have seen that in some blogs. Can you confirm this? Now I am trying to filter by CADD>20 using this command using bcftools/1.11: bcftools view -i "INFO/CADD_phred>20" -Oz -o out.vcf.gz in.vcf.gz This is the error message: Error: cannot use arithmetic operators to compare strings and numbers

I have tried to change the header for CADD_phred from string to float and invoked the above command, but it didn't work.

INFO=

INFO=

I am also trying to filter variants by nonsynonymous_SNV and stopgain but I haven't been successful.

Any idea how to proceed? Thanks in advance

brentp commented 1 year ago

Hi, Is this related to vcfanno?

a . value means unknown or undefined. You should leave CADD_phred as Number if you are trying to use numeric comparison.

alanmejiamaza commented 1 year ago

ok. Thanks a lot.