bcftools norm m+any does NOT update AN value

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

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
c

Research direction

Start with the attached a.zip and a.vcf, then reproduce the issue with bcftools norm -m+any and inspect the resulting AN values. Compare the merged record with the original records and run bcftools stats to confirm the incorrect-count error is resolved. The issue also raises whether SNP and INDEL records from bcftools call should be combined, but that scope needs clarification.

Written by the indexing model from the issue text.

Description

bcftools norm m+any does NOT update AN value. and then sometimes bcftools stats will failed with this error message : [E::bcf_calc_ac] Incorrect AN/AC counts at 18:77105055

Version:bcftoosl 1.2 and bcftools 1.3.1-220

a.zip

If we bcftools norm -m+any a.vcf in a.zip, the two record(AN=176,AN=186) will become one, and the AN value is 176, It is wrong, it should not be less than 186.

We need to update this AN value.

by the way, it is difficult to merge all attr of two record if there are outputted separately by bcftools call, so we need to output the SNP and INDEL of same site into one VCF record?
The a.vcf in a.zip is outputted by bcftools call.

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.