-
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 1.10 Unexpected type 0 #1123
Comments
I am unable to reproduce the error with the header and the data line you provided. What is the exact command you are running? Any chance you could provide a test case? |
happy to provide the example file, do you have a DM link for the files? |
Thank you for the test case. The problem was introduced when 64-bit support was added to htslib. A minimal example to reproduce the problem:
|
Any 64-bit INFO field that wasn't the last in the list would cause subsequent fields to be decoded incorrectly. This commit fixes that, plus updates the tests accordingly so the bug could be triggered. Fixes samtools#999 Fixes samtools/bcftools#1123
Is it the case that the problematic line (from which Petr has distilled a minimal example) is in fact the line following the (Or it may be several lines further on — the way that line has been clipped at |
Indeed we still haven't seen the original data which triggered the whole problem. @pd3 - was the MPOS field you constructed for your example the same name and value that was culled from the test data you were provided? This would really help in a bug report to know that the issue we found and fixed is infact the same one. @TGEN-BTurner can you please check whether PR samtools/htslib#1000 fixes your problem? |
I can confirm that samtools/htslib#1000 fixes the problem. I tested on a different sample than before but here is a before and after the fix being applied: Before:
After:
|
On request, the proposal now is a bit different. That I think this is fine. The -2147483648 is just the result of a ghastly bug due to failure to initialise a variable correctly. Replacing it with the "missing" value is the most accurate representation of what happened. |
After testing with the latest release (1.10) we've encountered an error when using bcftools view and filter:
chr1 17000202 . A C . clustered_events;haplotype;normal_artifact;strand_bias CONTQ=64;DP=125;ECNT=3;GERMQ=93;MBQ=17,29;MFRL=193,164;MMQ=60,60;MPOS=6;NALOD=-0.8027;NLOD=15.98;POPAF=6;ROQ=69;SEQQ=53;STRANDQ=1;TLOD=11.37 GT:AD:AF:DP:F1R2:F2R1:PGT:PID:PS:SB 0|1:38,6:0.143:44:8,3:4,1:0|1:17000202_A_C:17000202:8,30,6,0 0|0:68,1:0.028:69:12,1:22,0:0|1:17000[E::bcf_fmt_array] Unexpected type 0
However if we look at this same line with zcat we see:
chr1 17000202 . A C . clustered_events;haplotype;normal_artifact;strand_bias CONTQ=64;DP=125;ECNT=3;GERMQ=93;MBQ=17,29;MFRL=193,164;MMQ=60,60;MPOS=6;NALOD=-8.027e-01;NLOD=15.98;POPAF=6.00;ROQ=69;SEQQ=53;STRANDQ=1;TLOD=11.37 GT:AD:AF:DP:F1R2:F2R1:PGT:PID:PS:SB 0|1:38,6:0.143:44:8,3:4,1:0|1:17000202_A_C:17000202:8,30,6,0 0|0:68,1:0.028:69:12,1:22,0:0|1:17000202_A_C:17000202:11,57,1,0
We don't encounter this [E::bcf_fmt_array] Unexpected type 0 when using bcftools 1.9 though.
Additionally here is our header, excluding the contigs:
The text was updated successfully, but these errors were encountered: