This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Efficiently Adding Missing 0/0 Sites to VCF from Whole-Genome Sequencing

Hey, from time to time I find myself wondering if there is a straight-forward way to add missing 0/0 sites at a set of positions to a VCF that resulted from whole-genome sequencing and therefore only contains het and hom-alt sites. The best solution I found so far involves merging a sample that contains all sites of interest (e.g. from 1kg) to the VCF with bcftools using the option to set missings to zero and then remove the sample again. It works, but it is cumbersome and it feels like there should be a better way of doing this. Thank you for your help!

vcf

1 answer

 bcftools +setGT in.vcf -- -t q -i 'GT="RR"' -n .

Log in to answer this question.