This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Converting GP field in a VCF to GT

My VCF file is only populated with posterior genotype probabilities (GP - derived from a BGEN file) for each variant, is there any way to convert the GP field to GT (genotyped 0/0, 0/1, 1/1 or ./.)? Could anyone suggest a bit of software which can easily handle 10K odd human samples imputed with HRC v1.1?

#CHROM POS    ID     REF    ALT    QUAL   FILTER INFO   FORMAT 31610M
1      13380  1:13380 C      G      .      .      .      GP     1,0,0

to

#CHROM POS    ID     REF    ALT    QUAL   FILTER INFO   FORMAT 31610M
1      13380  1:13380 C      G      .      .      .      GT:GP     0/0:1,0,0
vcf threshold gt gp

1 answer

After abit more digging around, I found the following solution:

QCTool

qctool -g input.vcf.gz -threshold 0.9 -og output.gt.vcf.gz

https://www.well.ox.ac.uk/~gav/qctool_v2/documentation/examples/converting_genotypes.html

"the output VCF file will contain two FORMAT fields, namely GT (the threshholded call) and GP (the original imputed probabilities)".

Log in to answer this question.