#include <pbbam/CompositeBamReader.h>
template <typename OrderByType>
class PacBio::BAM::PbiFilterCompositeBamReader

Provides read access to multipe BAM files, limiting results to those passing a PbiFilter.

Requires a ”.pbi” file for each input BAM file.

The template parameter OrderByType is not fully implemented at this time. Use of comparison functor (e.g. Compare::Zmw) for this will currently result in the proper “next” value at each iteration step, independently, but not over the full data set. If all files’ “order-by” data values are accessible in increasing order within each file, then the expected ordering will be observed, However, if these data are not sorted within a file, the final results will appear unordered. Example: file 1: { 1, 5, 2, 6 } file 2: { 3, 8, 4, 7 } results: { 1, 3, 5, 2, 6, 8, 4, 7 } This a known issue and will be addressed in a future update. But in the meantime, use of Compare::None as the OrderByType is recommended, to explicitly indicate that no particular ordering is expected.

Contstructors & Related Methods

PbiFilterCompositeBamReader(const PbiFilter &filter, const std::vector<BamFile> &bamFiles)
PbiFilterCompositeBamReader(const PbiFilter &filter, std::vector<BamFile> &&bamFiles)
PbiFilterCompositeBamReader(const PbiFilter &filter, const DataSet &dataset)

Data Access

bool GetNext(BamRecord &record)

Fetches next BAM record in the interval specified.

true on success, false if no more data available.

PbiFilterCompositeBamReader &Filter(const PbiFilter &filter)

Sets a new PBI filter

reference to this reader

uint32_t NumReads() const

Public Types

using value_type = internal::CompositeMergeItem
using merge_sorter_type = internal::CompositeMergeItemSorter<OrderByType>
using container_type = std::deque<value_type>
using iterator = typename container_type::iterator
using const_iterator = typename container_type::const_iterator