kaori
A C++ library for barcode extraction and matching
Loading...
Searching...
No Matches
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, SeqLength template_length, const BarcodePoolContainer &barcode_pools, const Options &options)
 
CombinatorialBarcodesSingleEndset_first (bool t=true)
 
const std::unordered_map< std::array< BarcodeIndex, num_variable_ >, Count, CombinationHash< num_variable_ > > & get_combinations () const
 
Count get_total () const
 

Detailed Description

template<SeqLength max_size_, int num_variable_>
class kaori::CombinatorialBarcodesSingleEnd< max_size_, num_variable_ >

Handler for single-end combinatorial barcodes.

In this design, the vector sequence 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_size_Maximum length of the template sequences on both reads.
num_variable_Number of variable regions in the construct.

Constructor & Destructor Documentation

◆ CombinatorialBarcodesSingleEnd()

template<SeqLength max_size_, int num_variable_>
template<class BarcodePoolContainer >
kaori::CombinatorialBarcodesSingleEnd< max_size_, num_variable_ >::CombinatorialBarcodesSingleEnd ( const char * template_seq,
SeqLength template_length,
const BarcodePoolContainer & barcode_pools,
const Options & options )
inline
Parameters
[in]template_seqPointer to a character array containing the template sequence. This should contain exactly num_variable_ variable regions.
template_lengthLength of the array pointed to by template_seq. This should be less than or equal to max_size_.
barcode_poolsArray containing the barcode pools 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<SeqLength max_size_, int num_variable_>
const std::unordered_map< std::array< BarcodeIndex, num_variable_ >, Count, CombinationHash< num_variable_ > > & kaori::CombinatorialBarcodesSingleEnd< max_size_, num_variable_ >::get_combinations ( ) const
inline
Returns
All combinations encountered by the handler, along with their frequencies.

◆ get_total()

template<SeqLength max_size_, int num_variable_>
Count kaori::CombinatorialBarcodesSingleEnd< max_size_, num_variable_ >::get_total ( ) const
inline
Returns
Total number of reads processed by the handler.

◆ set_first()

template<SeqLength max_size_, int 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.

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