Is there a way to filter a VCF (input stream) on variants where at least a specific subset of the samples in the VCF have a heterozygous or homozygous genotype containing the minor allele?
Or the same filter but then for genotypes containing a non-major allele?
I looked at the bcftools and SnpSift filter documentation and I could not find how to do that in one of these tools. Maybe I overlooked the option or combination of options that I should use?
Closest options that I found are in SnpSift are:
isHom( GEN ) isHet( GEN ) isVariant( GEN ) isRef( GEN )
But SnpSift does not have a
isMinorAlleleGenotype( GEN ) functionality.
Is there another tool that can do this?
Or am I best of implementing this myself using a VCF library?