Document / Improve / Polish / Fix --indels-2.0

Open
#2,280 3 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
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
c

Research direction

Start with bam2bcf_iaux.c around line 468 and reproduce the failure using the test data linked from issue #2277. Read the history of --indels-2.0, PR #1679, and the merged --indels-cns work before deciding whether to retain or remove the experimental option. Done means the chosen direction is implemented and the reported assertion failures no longer confuse or break users.

Written by the indexing model from the issue text.

Description

bug D1: Difficult enhancement P2: Desirable

Indels-2.0 is somewhat buggy at present. On several tests it simply fails. For example the test data from https://github.com/samtools/bcftools/issues/2277.

bcftools: bam2bcf_iaux.c:468: iaux_align_read: Assertion `qry_off1<=qry_off2' failed.

Often this is due to the use of asserts to validate assumptions. Those validations are perhaps fine, but assert is not. Either it needs the asserts replacing by return codes to indicate errors, so that the alignment is rejected, or it needs canning as functionality. Basically it looks to be part-way through development and more of a prototype than a usable piece of code, although it is labelled as experimental to reflect that.

If I recall it was an attempt to rewrite my old PR (https://github.com/samtools/bcftools/pull/1679), but in doing so introduced bugs and lost most of the improvements in calling accuracy. Ultimately I improved on that PR and it got merged as --indels-cns, so we may need to decide what to do with the --indels-2.0 functionality.

Right now though I think it's just confusing for the users having multiple experimental options.

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.