BamTagCodec¶
#include <pbbam/BamTagCodec.h>
-
class
PacBio::BAM::
BamTagCodec
¶ The BamTagCodec class provides binary encoding/decoding of BAM tag data.
- Note
- BamTagCodec is mostly an implementation and/or testing detail, and may be removed from the public API.
Tag Collection Methods
-
static TagCollection
Decode
(const std::vector<uint8_t> &data)¶ Creates a TagCollection from raw BAM data.
- Return
- TagCollection containing tag data
- Parameters
data
: BAM-formatted (binary) tag data
-
static std::vector<uint8_t>
Encode
(const PacBio::BAM::TagCollection &tags)¶ Creates binary BAM data from a TagCollection.
- Return
- vector of bytes (encoded BAM data)
- Parameters
tags
: TagCollection containing tag data
Per-Tag Methods
-
static uint8_t
TagTypeCode
(const PacBio::BAM::Tag &tag, const TagModifier &additionalModifier = TagModifier::NONE)¶ Determines the SAM/BAM tag code for a Tag.
-
static std::vector<uint8_t>
ToRawData
(const PacBio::BAM::Tag &tag, const TagModifier &additionalModifier = TagModifier::NONE)¶ Encodes a single Tag‘s contents in BAM binary.
- Note
- This method does NOT encode the tag name & tag type. It does include the element type for array-type tags.
- Return
- vector of bytes (encoded BAM data)
- Parameters