bcftools icon indicating copy to clipboard operation
bcftools copied to clipboard

How to compute DS (diploid dosage) from HDS (haploid dosage) in VCF?

Open NadiAlipour opened this issue 10 months ago • 1 comments

Hello, I have a VCF file with GT:HDS (haploid dosage) values, but I need to generate GT:DS (diploid dosage), since this is the most common format in vcf files and used commonly for association analyses.

Is there a bcftools command or plugin to compute or convert the GT:DS field from GT:HDS?

The VCF FORMAT column is GT:HDS. A sample line looks like: chr22 10510303 ... GT:HDS 0|0:0,0 0|0:0.001,0 ...

VCF Header Snippet: ##FORMAT=<ID=HDS,Number=2,Type=Float,Description="Haploid Alternate Allele Dosage">

Thank you in advance for your guidance.

NadiAlipour avatar Mar 05 '25 10:03 NadiAlipour

Short answer is no, we don't have a plugin designed to do that. Possibly +fill-tags could be used for that. Can you explain how are the DS vs HDS values defined?

pd3 avatar Mar 09 '25 15:03 pd3