MappedLookupData

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

The MappedLookupData class provides quick lookup access to the “MappedData” section of the PBI index.

Constructors & Related Methods

MappedLookupData()

Creates an empty lookup data object.

MappedLookupData(const PbiRawMappedData &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 MappedLookupData::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 MappedLookupData::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<int32_t> tId_
OrderedLookup<uint32_t> tStart_
OrderedLookup<uint32_t> tEnd_
OrderedLookup<uint32_t> aStart_
OrderedLookup<uint32_t> aEnd_
OrderedLookup<uint32_t> nM_
OrderedLookup<uint32_t> nMM_
OrderedLookup<uint8_t> mapQV_
OrderedLookup<uint32_t> nIns_
OrderedLookup<uint32_t> nDel_
IndexList reverseStrand_
IndexList forwardStrand_

Public Types

enum Field

This enum describes the component fields of the MappedData section.

Values:

T_ID
T_START
T_END
A_START
A_END
N_M
N_MM
N_INS
N_DEL
MAP_QUALITY
STRAND