PbiFilterCompositeBamReader

#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.

Note
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.

Return
true on success, false if no more data available.

PbiFilterCompositeBamReader &Filter(const PbiFilter &filter)

Sets a new PBI filter

Return
reference to this reader

uint32_t NumReads() const

Public Types

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