The SAM file format specification makes clear that optional fields must follow the format TAG:TYPE:VALUE
Type Regexp matching VALUE Description
A [!-~] Printable character
i [-+]?[0-9]+ Signed integer
f [-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)? Single-precision floating number
Z [ !-~]* Printable string, including space
H ([0-9A-F][0-9A-F])* Byte array in the Hex format10
B [cCsSiIf](,[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?)+ Integer or numeric array
However, looking at the samtools source code, I noticed this:
https://github.com/samtools/samtools/blob/develop/sam_view.c#L920-L931
switch (aux_type) {
case 'H':
case 'Z':
if (kputs(bam_aux2Z(s), linebuf) < 0) return false;
break;
case 'i': kputw(bam_aux2i(s), linebuf); break;
case 'I': kputuw(bam_aux2i(s), linebuf); break;
case 'A': kputc(bam_aux2A(s), linebuf); break;
case 'f': kputd(bam_aux2f(s), linebuf); break;
case 'B': kputs("*** Unhandled aux type ***", linebuf); return false;
default: kputs("*** Unknown aux type ***", linebuf); return false;
}
Questions:
(1) I have never seen an "Integer or numeric array" of case "B"
. What does such an tag look like? Is there an example?
(2) Why is this currently "*** Unhandled aux type ***"
? Was this the case with previous versions of samtools?