Hi.
I always appreciate all your help.
I have one vcf file (a.vcf).
"a.vcf"
CHROM POS ID REF ALT QUAL FILTER INFO FORMAT sample1 sample2
chr3 186552857 . A G . . . GT:DP 0/1:0,0.995,0.005 0/0:0.8,0.2,0
In the file, there is the GP (genotype call probabilities that IMPUTE2 software estimated) information. However, there is no DS (the expected number of ALT alleles) information.
So I would like to obtain a vcf file (b.vcf), which include DS information that are estimated from the GP information.
"b.vcf"
CHROM POS ID REF ALT QUAL FILTER INFO FORMAT sample1 sample2
chr3 186552857 . A G . . . GT:DP:DS 0/1:0,0.995,0.005:1.005 0/0:0.8,0.2,0:0.2
Do you known any software that can estimate DS information based on the GP information and add the information to the vcf file?
Thank you.
1 answer
I just wrote a script to do this, but it adds the minor allele dosage not the alternate allele dosage. You can easily modify it to do alt, just get rid of the "if af>= .5" block and take off the else from the addition in the c script. https://github.com/7methylg/VCF-GP-to-DS
Only tested on mac, let me know if there are issues
Log in to answer this question.