Should a variant allele for an overlapping deletion always be variant type VCF_REF ?
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
- Domain
- bioinformatics, cli
Research direction
Start in vcf.c at bcf_set_variant_types around lines 3199-3258 and reproduce the supplied VCF with bcftools norm and query. Check the handling of '*' alleles with multi-base REF values, then inspect related issue #736 and existing variant-type tests. Done means the intended VCF_REF classification is decided and covered by a regression test or the behavior is documented as correct.
Written by the indexing model from the issue text.
Description
It seems that missing ALT alleles due to overlapping deletions are given different bcf variant types, based on the REF allele.
If the reference allele is a single nucleotide, the variant type is VCF_REF, if the reference allele is longer, the variant type is VCF_OTHER. Can VCF_REF variants cover more than one reference base?
My guess is that VCF_SNP is set for variants with single-nucleotide REF, '*' ALT alleles on line 3206 of bcf_set_variant_types.
If REF is longer than 1 character, the if on L3202 fails, leaving VCF_OTHER to be set on L3245.
https://github.com/samtools/htslib/blob/71b00a897bb9d6b6973c6bef2a2476f92f7a04d3/vcf.c#L3199-L3258
Related, #736 .
Example below
Given the input vcf:
##fileformat=VCFv4.3
##reference=ftp://ftp.1000genomes.ebi.ac.uk//vol1/ftp/technical/reference/phase2_reference_assembly_sequence/hs37d5.fa.gz
##contig=<ID=1,assembly=b37,length=249250621>
#CHROM POS ID REF ALT QUAL FILTER INFO
1 934151 . C CGCGGAGCGAGAGCGGAGCGGAGCGGAGCGGA . PASS .
1 934155 . GAGC G,* . PASS .
1 934158 . C *,G . PASS .
1 934162 . G GCGGA . PASS .
1 934164 . G A,GA,* . PASS .
1 934180 . C G . PASS .
I split all multiallelics to biallelic.
$bcftools norm -m -any -N -o split.vcf in.vcf
Lines total/split/realigned/skipped: 6/3/0/0
...
#CHROM POS ID REF ALT QUAL FILTER INFO
1 934151 . C CGCGGAGCGAGAGCGGAGCGGAGCGGAGCGGA . PASS .
1 934155 . GAGC G . PASS .
1 934155 . GAGC * . PASS .
1 934158 . C * . PASS .
1 934158 . C G . PASS .
...
And printed the variant types
$bcftools query -H -f '%CHROM\t%POS\t%REF\t%ALT\t%TYPE\n' split.vcf
# [1]CHROM [2]POS [3]REF [4]ALT [5]TYPE
1 934151 C CGCGGAGCGAGAGCGGAGCGGAGCGGAGCGGA INDEL
1 934155 GAGC G INDEL
1 934155 GAGC * OTHER
1 934158 C * REF
1 934158 C G SNP
1 934162 G GCGGA INDEL
1 934164 G A SNP
1 934164 G GA INDEL
1 934164 G * REF
1 934180 C G SNP
- 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