Hi,
I am trying to filter variants using "bcftools filter". I want to get the lines which contain SNPs and not INDELs. I have been trying to use the "TYPE" option along with other filter expressions but I am getting an error saying - [filter.c:1963 filters_init1] Error: the tag "snp" is not defined in the VCF header
. What is the correct way to do this ?
The command which I have used is
bcftools filter -i "TYPE="snp" && MIN(DP)>5 && QUAL>10" input.vcf > output.vcf
Thanks for your help.
Be attentive in using
&&
and&
. Inquisitive8995Hi, Which one would you prefer to be a better option ? Using "&&" , "&" or " ||"
Hello,
have a look at this thread: Difference between | and || in filtering expressions by bcftools
The difference between
&&
and&
is quite clear. What exactly is the difference between|
and||
and when to use what, it seems nobody knows or can explain :(fin swimmer