Entering edit mode
3 months ago
analyst
▴
70
I have merged vcf file. I need to keep heterozygous genotypes with heterozygosity < 0.2.
How can I do through bcftools?
I found this command to remove heterozygous genotypes:
bcftools view -e 'GT="het"' merged_annotated_snps.vcf > merged_annotated_polymorphic_snps.vcf
How can I modify above command to retain genotypes with heterozygosity < 0.2 ?
Also my goal is to keep polymorphic alleles.
Thanks a lot
No i mean heterozygosity such as 'GT="het"'