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

Open
#2,376 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
25/100
Issue type
Documentation
Clarity
Needs clarification
Activity status
Stale

Research direction

Start with the issue's GT:HDS example and VCF header snippet, then inspect the bcftools command and plugin documentation for dosage transformations. Done means establishing whether an existing command or plugin supports this conversion and documenting the applicable guidance or limitation.

Written by the indexing model from the issue text.

Description

needs-feedback

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.

Dominant language
C
Stars
891
Forks
277
Avg merge
2d 23h
Merged PRs (30d)
2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from samtools/bcftools

All issues in samtools/bcftools

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.