kaori
A C++ library for barcode extraction and matching
Loading...
Searching...
No Matches
kaori::BarcodePool Class Reference

Pool of barcode sequences. More...

#include <BarcodePool.hpp>

Public Member Functions

 BarcodePool ()=default
 
 BarcodePool (std::vector< const char * > barcode_pool, std::size_t barcode_length)
 
 BarcodePool (const std::vector< std::string > &barcode_pool)
 
const std::vector< const char * > & pool () const
 
SeqLength length () const
 
BarcodeIndex size () const
 
const char * operator[] (BarcodeIndex i) const
 

Detailed Description

Pool of barcode sequences.

The BarcodePool class defines the pool of possible barcode sequences for one of the variable regions in the template sequence. All sequences in this set are assumed to have the same length.

Constructor & Destructor Documentation

◆ BarcodePool() [1/3]

kaori::BarcodePool::BarcodePool ( )
default

Default constructor.

◆ BarcodePool() [2/3]

kaori::BarcodePool::BarcodePool ( std::vector< const char * > barcode_pool,
std::size_t barcode_length )
inline
Parameters
barcode_poolVector of pointers to arrays of length barcode_length. Each array corresponds to one possible barcode sequence.
barcode_lengthLength of each barcode sequence.

◆ BarcodePool() [3/3]

kaori::BarcodePool::BarcodePool ( const std::vector< std::string > & barcode_pool)
inline
Parameters
barcode_poolVector of sequences of the same length, containing the pool of possible barcode sequences. It is assumed that the lifetime of barcode_pool (and its strings) exceeds that of the constructed BarcodePool.

Member Function Documentation

◆ length()

SeqLength kaori::BarcodePool::length ( ) const
inline
Returns
Length of each sequence in pool().

◆ operator[]()

const char * kaori::BarcodePool::operator[] ( BarcodeIndex i) const
inline
Parameters
iIndex of a barcode sequence.
Returns
Pointer to the i-th sequence in the pool.

◆ pool()

const std::vector< const char * > & kaori::BarcodePool::pool ( ) const
inline
Returns
Vector containing pointers to sequences of length equal to length().

◆ size()

BarcodeIndex kaori::BarcodePool::size ( ) const
inline
Returns
Number of sequences in pool().

The documentation for this class was generated from the following file: