Inconsistent consensus calling with -I and -s options
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- c
- Domain
- bioinformatics
Research direction
Reproduce the report with the linked test archive using samtools 1.3 and bcftools 1.5, then run the shown bcftools consensus command. Compare positions 6 and 45: the heterozygous A/T site at position 6 should receive an ambiguous call like the C/T site at position 45, rather than only the reference allele.】【。
Written by the indexing model from the issue text.
Description
Hello,
So I have been using bcftools to produce a consensus call for particular samples and possibly found a small bug.
Essentially I found when I specify -i (ambiguous calls) and -s ( apply variants of the given sample) for sites where I have a heterozygous SNP (e.g. A and T) with one allele being the same as the reference allele (A), only the reference allele is reported (A) (even if the T allele has greater coverage).
This does not happen if the two alleles differ from the reference allele (e.g. C and T). In this case bcftools consensus reports a Y (as expected).
I have made some test files to demonstrate this, along with the code to generate this.
Any help you could provide on this issue would be greatly appreciated,
Darren
Test files here
Code: (using test files above)
### samtools version 1.3
### bcftools version 1.5
samtools mpileup -uf EXP_01_test_ref.fa THE_test_aln-se.sorted.bam | bcftools call -mv -Oz -o THE_test_calls.vcf.gz
tabix THE_test_calls.vcf.gz
cat EXP_01_test_ref.fa | bcftools consensus -i -s THE_test_aln-se.sorted.bam THE_test_calls.vcf.gz > EXP_08_cns.fa
Excerpt from the mpileup file: (can be see using samtools mpileup -f EXP_01_test_ref.fa THE_test_aln-se.sorted.bam)
test_ref 3 G 27 ........................... @@@@@@@@@@@@@@@@@@@@@@@@@@@
test_ref 4 T 27 ........................... @@@@@@@@@@@@@@@@@@@@@@@@@@@
test_ref 5 C 27 ........................... @@@@@@@@@@@@@@@@@@@@@@@@@@@
test_ref 6 A 27 TTTTTTTTTTTTTT............. @@@@@@@@@@@@@@@@@@@@@@@@@@@
test_ref 7 G 27 ........................... @@@@@@@@@@@@@@@@@@@@@@@@@@@
test_ref 8 T 27 ........................... @@@@@@@@@@@@@@@@@@@@@@@@@@@
test_ref 9 T 27 ........................... @@@@@@@@@@@@@@@@@@@@@@@@@@@
test_ref 10 G 27 ........................... @@@@@@@@@@@@@@@@@@@@@@@@@@@
test_ref 11 G 27 ........................... @@@@@@@@@@@@@@@@@@@@@@@@@@@
...
test_ref 41 T 27 ........................... @@@@@@@@@@@@@@@@@@@@@@@@@@@
test_ref 42 T 27 ........................... @@@@@@@@@@@@@@@@@@@@@@@@@@@
test_ref 43 C 27 ........................... @@@@@@@@@@@@@@@@@@@@@@@@@@@
test_ref 44 C 27 ........................... @@@@@@@@@@@@@@@@@@@@@@@@@@@
test_ref 45 A 27 CCCCCCCCCCCCCTTTTTTTTTTTTTT @@@@@@@@@@@@@@@@@@@@@@@@@@@
test_ref 46 T 27 ........................... @@@@@@@@@@@@@@@@@@@@@@@@@@@
test_ref 47 A 27 ........................... @@@@@@@@@@@@@@@@@@@@@@@@@@@
Using the code above bcftools consensus gives an A (incorrectly?) for position 6 , and a Y at position 45 (correctly).
- 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