Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for VCFv4.4 / VCFv4.5 Number= fields #1874

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

daviesrob
Copy link
Member

Adds BCF_VL_* types for Number= P, LA, LG, LR and M, and updates bcf_hdr_register_hrec() so that it sets them.

Note that this changes handling of unrecognised Number= values. Previously htslib would attempt to treat these as numbers, and as it did not check for sscanf() failure they were stored as type BCF_VL_FIXED with count 0xfffff. This commit makes it print a warning and store the type as BCF_VL_VAR instead.

TODO:

  • Add tests
  • Check more header types in bcf_hdr_check_sanity()
  • Make bcf_remove_allele_set() work with local alleles

Adds BCF_VL_* types for Number= P, LA, LG, LR and M

Upgrades bcf_hdr_register_hrec() so that it sets the appropriate
value when it finds one of the new types in a FORMAT header line.

Only set number type BCF_VL_FIXED if the value can actually be
parsed as an integer.  Unknown types will now cause a warning
to be printed and will be treated as BCF_VL_VAR.

Adds doxygen style comments to describe the meaning of the various
BCF_VL_* values.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant