This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How can I convert heterozygous genotype data to missing data?

I want to remove heterozygous genotype data in multi-samples VCF. At first I used bcftools filter -e option, but it made output VCF that lots of sites are deleted because of few heterozygous genotypes. I think this result is not suitable to search valid SNPs. Therefore, I want to convert heterozygous genotype data to missing data for filteration using vcftools later. Could you recommend effective tools?

vcf heterozygous

You have not explained very well what you want to do. Can you show the commands that you have already used, and state what is the purpose (in your mind) of each command?

1 answer

You can do this using the bcftools plugin setGT:

$ bcftools +setGT input.vcf -- -t q -i 'GT="het"' -n "./." > output.vcf

But Kevin's questions persists: Why do you think this is useful?

fin swimmer

Log in to answer this question.