Hi,

I have a vcf file which I would like to filter by a list of SNP positions, which are present in a positions.txt file.

     bcftools filter -i 'POS=@positions.txt' input.vcf.bgz > output.vcf

However, this says:

    Error: could not parse the expression. Note that the "@file_name" syntax can be currently used with ID column only.

Is there another simple way filter by POS in bcftools?

Thanks. 


Yeah, I figured.

Actually found the answer here, so you can close the thread

https://www.biostars.org/p/170965/

thanks.