kaori
A C++ library for barcode extraction and matching
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
kaori::CombinatorialBarcodesSingleEnd< max_size, num_variable > Class Template Reference

Handler for single-end combinatorial barcodes. More...

#include <CombinatorialBarcodesSingleEnd.hpp>

Classes

struct  Options
 Optional parameters for CombinatorialBarcodeSingleEnd. More...
 

Public Member Functions

template<class BarcodePoolContainer >
 CombinatorialBarcodesSingleEnd (const char *template_seq, size_t template_length, const BarcodePoolContainer &barcode_pools, const Options &options)
 
CombinatorialBarcodesSingleEndset_first (bool t=true)
 
void sort ()
 
const std::vector< std::array< int, num_variable > > & get_combinations () const
 
int get_total () const
 

Detailed Description

template<size_t max_size, size_t num_variable>
class kaori::CombinatorialBarcodesSingleEnd< max_size, num_variable >

Handler for single-end combinatorial barcodes.

In this design, the barcoding element is created from a template with multiple variable regions. Each region contains a barcode from a different pool of options, where combinations are assembled randomly by library construction. The idea is to use the large number of combinations to provide many unique identifiers, e.g., for cell-tracing applications. This handler will capture the frequencies of each barcode combination.

Template Parameters
max_sizeMaximum length of the template sequences on both reads.
num_variableNumber of variable regions in the construct.

Constructor & Destructor Documentation

◆ CombinatorialBarcodesSingleEnd()

template<size_t max_size, size_t num_variable>
template<class BarcodePoolContainer >
kaori::CombinatorialBarcodesSingleEnd< max_size, num_variable >::CombinatorialBarcodesSingleEnd ( const char *  template_seq,
size_t  template_length,
const BarcodePoolContainer &  barcode_pools,
const Options options 
)
inline
Parameters
[in]template_seqTemplate sequence for the first barcode. This should contain exactly num_variable variable regions.
template_lengthLength of the template. This should be less than or equal to max_size.
barcode_poolsArray containing the known barcode sequences for each of the variable regions, in the order of their appearance in the template sequence.
optionsOptional parameters.
Template Parameters
BarcodePoolContainerSome iterable container of BarcodePool instances, usually either a std::vector or a std::array.

Member Function Documentation

◆ get_combinations()

template<size_t max_size, size_t num_variable>
const std::vector< std::array< int, num_variable > > & kaori::CombinatorialBarcodesSingleEnd< max_size, num_variable >::get_combinations ( ) const
inline
Returns
All combinations encountered by the handler.

◆ get_total()

template<size_t max_size, size_t num_variable>
int kaori::CombinatorialBarcodesSingleEnd< max_size, num_variable >::get_total ( ) const
inline
Returns
Total number of reads processed by the handler.

◆ set_first()

template<size_t max_size, size_t num_variable>
CombinatorialBarcodesSingleEnd & kaori::CombinatorialBarcodesSingleEnd< max_size, num_variable >::set_first ( bool  t = true)
inline
Parameters
tWhether to search only for the first match. If false, the handler will search for the best match (i.e., fewest mismatches) instead.
Returns
A reference to this CombinatorialBarcodesSingleEnd instance.

◆ sort()

template<size_t max_size, size_t num_variable>
void kaori::CombinatorialBarcodesSingleEnd< max_size, num_variable >::sort ( )
inline

Sort the combinations for easier frequency counting.


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