kaori
A C++ library for barcode extraction and matching
Loading...
Searching...
No Matches
kaori::DualBarcodesSingleEnd< max_size_ > Class Template Reference

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

#include <DualBarcodesSingleEnd.hpp>

Classes

struct  Options
 Optional parameters for DualBarcodeSingleEnd. More...
 

Public Member Functions

 DualBarcodesSingleEnd (const char *template_seq, SeqLength template_length, const std::vector< BarcodePool > &barcode_pools, const Options &options)
 
const std::vector< Count > & get_counts () const
 
Count get_total () const
 

Detailed Description

template<SeqLength max_size_>
class kaori::DualBarcodesSingleEnd< max_size_ >

Handler for single-end dual 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 the valid combinations of barcodes across variable regions are known beforehand. This differs from CombinatorialBarcodesSingleEnd where the combinations are assembled randomly. Despite its name, this handler can actually handle any number (>= 2) of variable regions in the combination. It will count the frequency of each barcode combination, along with the total number of reads.

Template Parameters
max_size_Maximum length of the template sequence.

Constructor & Destructor Documentation

◆ DualBarcodesSingleEnd()

template<SeqLength max_size_>
kaori::DualBarcodesSingleEnd< max_size_ >::DualBarcodesSingleEnd ( const char * template_seq,
SeqLength template_length,
const std::vector< BarcodePool > & barcode_pools,
const Options & options )
inline
Parameters
[in]template_seqPointer to an array containing the template sequence. The template may contain any number (usually 2 or more) of 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 pools of known barcode sequences for each of the variable regions, in the order of their appearance in the template sequence. Each pool should have the same number of barcodes; corresponding entries across pools define a specific combination of barcodes.
optionsOptional parameters.

Member Function Documentation

◆ get_counts()

template<SeqLength max_size_>
const std::vector< Count > & kaori::DualBarcodesSingleEnd< max_size_ >::get_counts ( ) const
inline
Returns
Counts for each combination. This has length equal to the number of valid barcode combinations (i.e., the size of any entry of barcode_pools in the constructor). Each entry contains the count for the corresponding combination.

◆ get_total()

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

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