Removing a symbolic allele from VCF header

Open
#585 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

Research direction

Start with bcf_hdr_remove and the referenced vcf.c sections around lines 755 and 761, then review how BCF_HL_GEN and BCF_HL_STR represent ##ALT entries. Determine whether a direct symbolic-allele removal operation is needed; done means the intended API behavior is agreed and covered for VCFv4.1 headers.

Written by the indexing model from the issue text.

Description

enhancement

I'm trying to remove the VCF header line for a symbolic alternate allele. Since ##ALT header lines belong to a specific BCF_HL_* type, it seems like my only options are removing all ##ALT= lines, or remove using the ID. Does this look right? Am I missing a more direct way?

bcf_hdr_append(hdr, "##ALT=<ID=DEL,Description=\"Deletion\">");

Remove all ##ALT= lines:

bcf_hdr_remove(hdr, BCF_HL_GEN, "ALT");

Remove by matching to the ID.

bcf_hdr_remove(hdr, BCF_HL_STR, "DEL");

Currently working in VCFv4.1

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.