-
Notifications
You must be signed in to change notification settings - Fork 240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BCFtools sort zero position overflow #1753
Comments
@pd3, could you check if you are able to reproduce this issue? |
It shouldn't go wrong like this ideally, but note the input is invalid. VCF is 1-based, not 0-based. The zeros have been converted to -1 (as internally the code is using 0-based coordinates) which has caused a wrap-around. |
@jkbonfield, actually, the VCF specification allows positions with |
This problem is not specific to |
@pd3, I have created the corresponding issue in htslib: samtools/htslib#1475 |
The 0 coordinate is valid in VCF specification, but the round-trip VCF -> BCF -> VCF turns MT:0 into MT:4294967296. Add a check to detect this overflow. See samtools#1475 and samtools/bcftools#1753
The 0 coordinate is valid in VCF specification, but the round-trip VCF -> BCF -> VCF turns MT:0 into MT:4294967296. Add a check to detect this overflow. See samtools#1475 and samtools/bcftools#1753
Fixed by samtools/htslib#1476 |
There is an overflow issue when sorting a VCF file with zero positions. Here is an example:
Unsorted VCF
Commands
Sorted VCF
Note how the
0
from3110098432:1
has been wrongly changed to4294967296
.The text was updated successfully, but these errors were encountered: