BasicLookupData¶
#include <pbbam/PbiLookupData.h>
-
class
PacBio::BAM::
BasicLookupData
¶ The BasicLookupData class provides quick lookup access to the “BasicData” section of the PBI index.
Constructors & Related Methods
-
BasicLookupData
()¶ Creates an empty lookup data object.
-
BasicLookupData
(const PbiRawBasicData &rawData)¶ Creates a lookup data object from the corresponding raw data.
- Parameters
rawData
: raw data loaded from a PBI file
Lookup Data Methods
-
void
ApplyOffsets
(IndexResultBlocks &blocks) const¶ Adds virtual file offset data to the index lookup result blocks.
A PBI lookup will result in a number of index lists, depending on the complexity of the PbiFilter involved. These index lists are then merged down into blocks of contiguous values, where each block describes a particular record index and the number of subsequent, contiguous reads that immediately follow it. In this manner, we need only perform seeks to the first record of each block.
This method takes such blocks and annotates them with the corresponding virtual file offset. Subsequent BAM readers can use this information to control file seeks.
- Parameters
blocks
:
- Exceptions
std::out_of_range
: if a block has an invalid index value
- template <typename T>
-
IndexList
Indices
(const BasicLookupData::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 lookupvalue
: value to lookupcompareType
: compare type
- template <typename T>
-
IndexList
IndicesMulti
(const BasicLookupData::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 lookupvalues
: values to lookup
-
const std::vector<int64_t> &
VirtualFileOffsets
() const¶ - Return
- the virtual file offsets for all records
Unnamed Group
-
UnorderedLookup<int32_t>
rgId_
¶ Lookup Data Members.
-
OrderedLookup<int32_t>
qStart_
¶
-
OrderedLookup<int32_t>
qEnd_
¶
-
OrderedLookup<int32_t>
holeNumber_
¶
-
OrderedLookup<float>
readQual_
¶
-
OrderedLookup<uint8_t>
ctxtFlag_
¶
-
std::vector<int64_t>
fileOffset_
¶
-