Feature request: the inverse of `norm --atomize`
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- c
- Domain
- bioinformatics
Research direction
Start by reproducing the behavior with the supplied bug.ref.fa and bug.vcf using bcftools norm -f. Review the norm command's atomization and normalization behavior, then determine how the inverse operation should represent the three distinct alleles. Done means the reproduction preserves those allele-specific deletions without producing the unexpected GCTC -> G result.
Written by the indexing model from the issue text.
Description
I found normalization will give incorrect result in this case:
1
|
a1 ACGCTCCTCC TCCAGA
a2 -------*** ------
a3 ---*------ ------
a4 ---*---*** ------
sh-5.0# bcftools view bug.vcf
...
#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT a1 a2 a3 a4
a1 7 . CTCC C . . . GT 0 1 0 1
a1 3 . GC G . . . GT 0 0 1 1
In this case, TCC is the repeat element right after a deletion GC -> G.
The normalization algorithm will left-align the deletion TCC in position 8-10 to position 5-7 and merge(?) the indel in position 4 at the same time.
VCF
sh-5.0# bcftools norm bug.vcf -f bug.ref.fa
...
##bcftools_normVersion=1.13+htslib-1.13
##bcftools_normCommand=norm -f bug.ref.fa bug.vcf; Date=Fri May 27 08:29:27 2022
#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT a1 a2 a3 a4
a1 3 . GCTC G . . . GT 0 1 0 1
a1 3 . GC G . . . GT 0 0 1 1
Lines total/split/realigned/skipped: 2/0/1/0
However, I don't why, the result become GCTC -> G, which is not a TCC deletion nor CTCC deletion either.
I think this is the multi-allelic case GCTCC -> {G, GC, GTCC} which I would possibly expected like so:
#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT a1 a2 a3 a4
a1 3 . GCTCC G . . . GT 0 0 0 1
a1 3 . GCTCC GC . . . GT 0 1 0 0
a1 3 . GCTCC GTCC . . . GT 0 0 1 0
Reproduce
Fasta
root@5d7310b4d3a0:/app# cat bug.ref.fa
>a1
ACGCTCCTCCTCCAGA
VCF
sh-5.0# bcftools view bug.vcf
##fileformat=VCFv4.1
##FILTER=<ID=PASS,Description="All filters passed">
##fileDate=20220527
##contig=<ID=a1,length=16>
##FORMAT=<ID=GT,Number=1,Type=String,Description="Genotype">
##bcftools_viewVersion=1.13+htslib-1.13
##bcftools_viewCommand=view bug.vcf; Date=Fri May 27 08:28:17 2022
#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT a1 a2 a3 a4
a1 7 . CTCC C . . . GT 0 1 0 1
a1 3 . GC G . . . GT 0 0 1 1
I ran the bcftools in docker with the latest image
quay.io/biocontainers/bcftools:1.13--h3a49de5_0
- 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