# convert GT:PL format to GT:GP format

I have a vcf info formatted in GT:PL.

chr22 49994037 . G A 345.64 PASS AC=1;AF=0.500;AN=2;BaseQRankSum=-3.605;DP=35;ExcessHet=3.0103;FS=1.377;MLEAC=1;MLEAF=0.500;MQ=60.00;MQRankSum=0.000;QD=10.17;ReadPosRankSum=-0.035;SOR=0.392 GT:AD:DP:GQ:PL 0/1:20,14:34:99:353,0,588

I want to convert it into GT:GP. But I have to write a script for that. Is there any way to do it fast and simple?

Note:

GT:Genotype

PL: Phred-scaled Genotype Likelihoods

GP: Genotype Probabilities

check the link below for all the info tags

https://samtools.github.io/hts-specs/VCFv4.2.pdf

• Seems like you may be confusing genotype probability and genotype likelihood? That's how you convert GL to PL, not GP to PL. Sep 22 at 14:18
• I think I am right. GP limits to 0 to 1 probability. GL is genotype likelihoods comprised of comma-separated floating point log10-scaled likelihoods and PL is a Phred-scaled likelihood. So, the conversion formulae should be like this. Can u clarify what I have done wrong? Sep 22 at 16:08
• It says PL : the phred-scaled genotype likelihoods, not genotype probabilities. You said you want genotype probabilities, not genotype likelihoods. Why are you trying to convert PL to GP anyway? Genotype probabilities are usually posterior probabilities from imputation and genotype/phred-scaled likelihoods are what you get from variant callers. Sep 22 at 16:11
• to compare my imputation accuracy with true genotype. Sep 22 at 16:11
• So the line you shared is presumably the true genotype, since it doesn't look like it's been imputed? Either way, you want to use dosages for that, not genotype probabilities. Why do you want genotype probabilities? Sep 22 at 16:14

Currently you have phred-scaled genotype likelihoods or PL values. Genotype likelihoods give the likelihood of observing the read data (i.e. the number of reads which map to either the ref or alt allele), given a particular underlying genotype (0/0, 0/1, 1/1 at a bi-allelic locus); $$GL = p(G|D)$$. Phred scaling simply scales it like $$PL = -10 * log(GL)$$. These are usually given by a genotype caller.