I have a VCF file obtained from the Varscan2 tool. I want to filter the variants based on "FREQ". I used SnpSift (SnpSiftVersion="SnpSift 4.2 (build 2015-12-05), by Pablo Cingolani"). When I used the command: java -Xmx64g -jar ${SNPSIFT_JAR} extractFields $svcf "GEN[1].FREQ" I got the right field of my vcf file: 0.52% 0% 0.72% 0% 0.31% 0.21% 0.31% 0.31%
But when I tried to filter variant with a freq greter than 0.1, no variant pass the filter. I ran this command: java -Xmx64g -jar ${SNPSIFT_JAR} filter " ( GEN[0].FREQ > 0.1 ) " $svcf
I got the feeling that freq is not an integer.
Any suggstion?
thank you Marco
1 answer
from this old file https://github.com/blachlylab/mucor/blob/master/examples_package/data/NA12878.VarScan.indels.vcf (2015)
FREQ is a string
##FORMAT=<ID=FREQ,Number=1,Type=String,Description="Variant allele frequency">
check this in your VCF header.
Log in to answer this question.