BarcodeLookupData

#include <pbbam/PbiLookupData.h>
class PacBio::BAM::BarcodeLookupData

The BarcodeLookupData class provides quick lookup access to the “BarcodeData” section of the PBI index.

Constructors & Related Methods

BarcodeLookupData()

Creates an empty lookup data object.

BarcodeLookupData(const PbiRawBarcodeData &rawData)

Creates a lookup data object from the corresponding raw data.

Parameters
  • rawData: raw data loaded from a PBI file

Lookup Data Methods

template <typename T>
IndexList Indices(const BarcodeLookupData::Field &field, const T &value, const Compare::Type &compareType = Compare::EQUAL) const

This method dispatches a single-value lookup query to the proper data member.

Client code, such as custom filters, should use this when possible, only touching the raw fields for more complex operations (e.g. when unpacking is necessary).

Return
sorted list of unique indices that satisfy the lookup
Parameters
  • field: section field to lookup
  • value: value to lookup
  • compareType: compare type

template <typename T>
IndexList IndicesMulti(const BarcodeLookupData::Field &field, const std::vector<T> &values) const

This method dispatches a multi-value lookup query to the proper data member.

Client code, such as custom filters, should use this when possible, only touching the raw fields for more complex operations (e.g. when unpacking is necessary).

Note
There is no compare type parameter here, it is always Compare::EQUAL. Results will correspond to an exact match on at least one value in the list.
Return
sorted list of unique indices that satisfy the lookup
Parameters
  • field: section field to lookup
  • values: values to lookup

Lookup Data Members

OrderedLookup<int16_t> bcForward_
OrderedLookup<int16_t> bcReverse_
OrderedLookup<int8_t> bcQual_

Public Types

enum Field

This enum describes the component fields of the BarcodeData section.

Values:

BC_FORWARD
BC_REVERSE
BC_QUALITY