bcftools annotate doesn't liftover fields from VCF with symbolic alleles if END in only one file.
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- c
- Domain
- bioinformatics
Research direction
Reproduce the command with matching VCFs containing symbolic alleles and compare behavior with and without --pair-logic any/all. Then inspect the matching logic around bcf_sr_sort.c lines 400-416 in the referenced htslib revision. Done means symbolic-allele records match when END is present in only one file, while other requested annotation fields are transferred correctly.
Written by the indexing model from the issue text.
Description
Hi,
I'm using bcftools annotate -c INFO -a variant_calls.vcf.gz imputed.vcf.gz to liftover annotations from a variant-call VCF (with meaningful INFO tags) into an imputed VCF (exact same variants, but removes the original INFO tags with other tags). Critically, the two files have the exact same number and order of variants, and POS/ID/REF/ALT are untouched. This works well for SNPs and most SVs, but seems to ignore symbolic alleles. Adding --pair-logic any/all does then carry over all the INFO annotation for all variants, but not the other options like id even though the symbolic allele variant has a unique ID.
It seems like the issue is that the symbolic alleles have their END info stripped by imputation, so the variants are no longer matched, since one is ID/end_pos and the other is just ID.
I guess this is an extreme edge-case as it is complex and probably fragile to only append END if both files have END, otherwise don't use it for either. I guess the most elegant/ugly solution would be to strip/rename the END tag, merge INFOs, and then rename END or recalculate from POS+SVLEN.
The versions are
bcftools 1.23-3-g34a49760-dirty
Using htslib 1.23-9-gacc28ac1-dirty
Best,
Alex
- Dominant language
- C
- Stars
- 891
- Forks
- 277
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from samtools/bcftools
-
needs-feedback
Difficulty 3/5 1-2 days Newbie friendliness 55/100
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 45/100
-
htslib-dependent P2: Desirable
Difficulty 3/5 1-2 days Newbie friendliness 48/100
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
-
needs-feedback requires-test-case
Difficulty 3/5 1-2 days Newbie friendliness 55/100
All issues in samtools/bcftools
Similar issues
-
[adam] AdamNet network read doesn't cap to MAX_ADAM_PACKET_LEN, overflows client receive buffers Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
FujiNetWIFI/fujinet-firmware#1649 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
HarbourMasters/Shipwright#7229 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
riscv-software-src/riscv-isa-sim#2435 · 1 comment ·
-
bug Self Built Image SNAPSHOT Supported Device target/ramips
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100