Flag type allowed on FORMAT headers

Open
#334 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
c

Research direction

Start by reviewing the FORMAT header rules in the spec and the bcf_update_format entry point mentioned in the issue. Determine whether FORMAT fields of type Flag should be supported or rejected, and how Number=0 should be enforced. Done means the project has a decided behavior for these cases and the API follows it consistently.

Written by the indexing model from the issue text.

Description

The current htslib 1.3 code does not raise an error or warning when FORMAT headers are declared with type Flag. Nor does it appear that bcf_update_format will encode flag values that can be written as BCF2 values (per the spec). Secondarily, htslib 1.3 does not enforce that Number=0 for headers of type Flag.

Is it time to:

  • amend the spec and support Flags in FORMATs?
  • or lock down the API to prevent writing invalid data?
Dominant language
C
Stars
950
Forks
475
Avg merge
3d 13h
Merged PRs (30d)
11

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/htslib

All issues in samtools/htslib

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.