bcftools annotate multi-allelic weird behavior
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 42/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- c
- Domain
- bioinformatics
Research direction
Reproduce the report with the two VCF examples and the shown bcftools annotate command, comparing the long multi-allelic ALT values with the version where the final allele is G. Start by locating the annotate allele-matching path and add a regression case for these inputs; done means the final two annotations remain 9 and 10 rather than both becoming 9.
Written by the indexing model from the issue text.
Description
Hi,
I have spotted a weird behaviour when annotating some multi-allelic variants with bcftools annotate (v1.9).
Let say I have an external vcf containing the annotations Annot1 and Annot2 for a multi-allelic of 10 alternate alleles :
##fileformat=VCFv4.2
##INFO=<ID=Annot1,Number=A,Type=Integer,Description="Annot1">
##INFO=<ID=Annot2,Number=A,Type=Integer,Description="Annot2">
#CHROM POS ID REF ALT QUAL FILTER INFO
1 123456 . C CTA,CTATA,CTATATA,CTATATATA,CTATATATATA,CTATATATATATA,CTATATATATATATA,CTATATATATATATATA,CTATATATATATATATATA,CTATATATATATATATATA . . Annot1=1,2,3,4,5,6,7,8,9,10;Annot2=1,2,3,4,5,6,7,8,9,10
This is the original vcf I want to annotate:
##fileformat=VCFv4.2
##contig=<ID=1,length=249250621,assembly=b37>
##INFO=<ID=AC,Number=A,Type=Integer,Description="Allele count in genotypes, for each ALT allele, in the same order as listed">
#CHROM POS ID REF ALT QUAL FILTER INFO
1 123456 . C CTA,CTATA,CTATATA,CTATATATA,CTATATATATA,CTATATATATATA,CTATATATATATATA,CTATATATATATATATA,CTATATATATATATATATA,CTATATATATATATATATA . . AC=1,2,3,4,5,6,7,8,9,10
I use then the command
bcftools annotate -a annotation.vcf.gz -c Annot1,Annot2 original.vcf.gz
and I obtain this
1 123456 . C CTA,CTATA,CTATATA,CTATATATA,CTATATATATA,CTATATATATATA,CTATATATATATATA,CTATATATATATATATA,CTATATATATATATATATA,CTATATATATATATATATA . . AC=1,2,3,4,5,6,7,8,9,10;Annot1=1,2,3,4,5,6,7,8,9,9;Annot2=1,2,3,4,5,6,7,8,9,9
So that I have 2 "9" in my annotations instead of 9,10 for the last 2 alleles.
Surprisingly if I rename the last allele from CTATATATATATATATATA to G in both my annotations and original vcf files I obtain the right result :
1 123456 . C CTA,CTATA,CTATATA,CTATATATA,CTATATATATA,CTATATATATATA,CTATATATATATATA,CTATATATATATATATA,CTATATATATATATATATA,G . . AC=1,2,3,4,5,6,7,8,9,10;Annot1=1,2,3,4,5,6,7,8,9,10;Annot2=1,2,3,4,5,6,7,8,9,10
Could you explain why the behavior of the annotation command changes regarding the allele name ?
Best,
- 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