I have a multisample VCF file (30 samples) with haploid calls and I want to filter off all sites where this condition holds true;
'sum of ref (GT=0) and missing/uncalled (GT=".") genotypes in all samples is 30'
I have tried this in bcftools but it doesn't seem to work ;
bcftools view -e '(sum(GT[*] =".") + sum(GT[*]="0")) == 30' samples.vcf > filtered_samples.vcf
Please advise on how to correctly do it with bcftools or with any other approach.