Question: How to add DS genotype in vcf file.
0
gravatar for Apprentice
3.6 years ago by
Apprentice30
Apprentice30 wrote:

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.

sequencing snp genome • 2.4k views
ADD COMMENTlink modified 3.0 years ago by 7methylg10 • written 3.6 years ago by Apprentice30
1
gravatar for 7methylg
3.0 years ago by
7methylg10
7methylg10 wrote:

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 COMMENTlink written 3.0 years ago by 7methylg10
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1928 users visited in the last hour