IndexResultBlock

#include <pbbam/PbiBasicTypes.h>
struct PacBio::BAM::IndexResultBlock

The IndexResultBlock class represents a contiguous group of records returned from a PBI lookup.

Contiguous reads that satisfy a PBI lookup query will be merged down into a single block. This helps to minimize the number of seeks in subsequent read operations.

An PBI-enabled reader or query can iterate over a list of IndexResultBlocks; for each block, seeking to the first record and then sequentially reading ‘numReads’ consecutive records before needing to seek again.

Public Functions

IndexResultBlock()
IndexResultBlock(size_t idx, size_t numReads)
bool operator==(const IndexResultBlock &other) const
bool operator!=(const IndexResultBlock &other) const

Public Members

size_t firstIndex_ = 0

index of block’s first record in BAM/PBI files (e.g. i-th record)

size_t numReads_ = 0

number of reads in this block

int64_t virtualOffset_ = -1

virtual offset of first record in this block

using PacBio::BAM::IndexResultBlocks = typedef std::deque<IndexResultBlock>

container of PBI result blocks

using PacBio::BAM::IndexList = typedef std::vector<size_t>

container of raw PBI indices

This is the primary result of PbiFilter -associated classes. This raw list can participate in set operations (union, intersect) for compound filters, and then be merged down into IndexResultBlocks for actual data file random-access.

using PacBio::BAM::IndexRange = typedef std::pair<size_t, size_t>

pair representing a range of PBI indices: where interval is [first, second)

Used primarily by the PBI’s CoordinateSortedData components.

See
PbiReferenceEntry, PbiRawReferenceData, & ReferenceLookupData