Thanks. This seems to work, at least I don't see any sole GT 0|0 records.
What is the bcftools view equivalent parameter of GATK SelectVariants --excludeNonVariants?
GATK SelectVariants has the option with the --excludeNonVariants parameter to exclude variants that only have hom-ref genotype calls after sub setting to a set of samples.
I would like to know how to do the same with BCFTools view.
I don't see a similar switch specified in the BCFTools view documentation: https://samtools.github.io/bcftools/bcftools.html#view
2 answers
How about
bcftools view -c1 input.vcf
to select sites with at least one non-ref allele?
Try
bcftools filter --exclude 'TYPE="ref"' input.vcf
Tried that but it does not work. Still have records with sole genotype being GT 0|0.
Need to run BCFtools view btw, first. Tried adding the exclude command to the view command or in a bcftools filter command after sub setting the samples.
Log in to answer this question.