Constructor
Check if tag type is type T
Check if tag type is type T
Check if tag type is type T
check if empty/exists/null
Convert tag value
Convert tag value
Convert tag value
Convert tag value to float array
Convert tag value to integer
Convert tag value to integer array
Convert tag value to string
Alias seq allows us to have an enum of types. https://forum.dlang.org/post/kmdjfzpugudmwfrdgson@forum.dlang.org Thanks Paul!
Usage: auto t = TagValue(b, 'XX') where b is bam1_t* BAM record and XX is tag
This represents a SAM/BAM record tag value, as outlined in the SAM specs §1.5.
The struct itself stores only a pointer to the tag, and has member functions to parse into any of the tag types (but only if the tag matches that type) (TODO: is this true?)
Primary Types: A Printable character i Signed integer (see specs §1.5 footnote on size) f Single-precision float Z Printable string, including space H Byte array in the Hex format (network byte order / big-endian) B Integer or numeric array
Byte-array (B) types: c byte C ubyte s short S ushort i int32 I uint32 f float (spec does not indicate precision)
Memory layout pipes delimit byte boundaries in an array 8/9 are example values 2 is a count of the array the ubyte * starts at the type char c | 8| s | | 8| i | | | | 8| B |i | | | | 2| | | | 8| | | | 9|