Closed jkbonfield closed 8 years ago
Hi James, these fields are internal to bcftools calling and may change, so I guess that's the reason why they weren't properly documented. All the fields are sums, including Q^2, so the values do make sense: in your example there are two reads. If both have base quality of 36, then Qsum=72 and Q^2sum=2592.
Generating a bcf file from bcftools inserts I16 field. The header states:
The code it refers to is:
These appear to be filled out here:
Yet looking at the lines, this just doesn't make sense.
ref(5) should be ref(4)^2 and ref(9) should be ref(8)^2. Yet an example VCF entry is:
Here baseQ is 72, yet 72^2 is not 2592. mapQ is 25, but 25^2 is not 325. How are these computed? It looks like they should be correct based on the code, but I assume something else is subsequently modifying these values.
(I'm only interested because one of my speedups has modified one of these by 1, possibly just a minor rounding difference, but I'm trying to understand if it matters.)
Ideally these should be in the bcftools man page too. Asking people to read the code is rather unfriendly. Does anything downstream read these fields, or are they simply debugging data?
Edit: I spotted code in ccall.c and mcall.c that uses I16 (anno16[]), but only the first 4 elements.