How to add DS genotype in vcf file.
1
0
Entering edit mode
8.0 years ago
Apprentice ▴ 170

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.

SNP genome sequencing • 5.0k views
ADD COMMENT
1
Entering edit mode
7.4 years ago
7methylg ▴ 10

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

ADD COMMENT

Login before adding your answer.

Traffic: 2246 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6