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

Handler for dual barcodes. More...

#include <DualBarcodesPairedEnd.hpp>

Classes

struct  Options
 Optional parameters for DualBarcodesPairedEnd. More...
 

Public Member Functions

 DualBarcodesPairedEnd (const char *template_seq1, size_t template_length1, const BarcodePool &barcode_pool1, const char *template_seq2, size_t template_length2, const BarcodePool &barcode_pool2, const Options &options)
 
const std::vector< int > & get_counts () const
 
int get_total () const
 

Detailed Description

template<size_t max_size>
class kaori::DualBarcodesPairedEnd< max_size >

Handler for dual barcodes.

In this design, each read contains a barcoding element created from a template with a single variable region. For one read, the barcode is drawn from one pool of options, while the other read contains a barcode from another pool. However, unlike CombinatorialBarcodesPairedEnd, the combinations are not random but are specifically assembled, typically corresponding to specific pairs of genes. This handler will capture the frequencies of each barcode combination.

Template Parameters
max_sizeMaximum length of the template sequences on both reads.

Constructor & Destructor Documentation

◆ DualBarcodesPairedEnd()

template<size_t max_size>
kaori::DualBarcodesPairedEnd< max_size >::DualBarcodesPairedEnd ( const char *  template_seq1,
size_t  template_length1,
const BarcodePool barcode_pool1,
const char *  template_seq2,
size_t  template_length2,
const BarcodePool barcode_pool2,
const Options options 
)
inline
Parameters
[in]template_seq1Pointer to a character array containing the first template sequence. This should contain exactly one variable region.
template_length1Length of the first template. This should be less than or equal to max_size.
barcode_pool1Pool of known barcode sequences for the variable region in the first template.
[in]template_seq2Pointer to a character array containing the second template sequence. This should contain exactly one variable region.
template_length2Length of the second template. This should be less than or equal to max_size.
barcode_pool2Pool of known barcode sequences for the variable region in the second template.
optionsOptional parameters.

barcode_pool1 and barcode_pool2 are expected to have the same number of barcodes. Corresponding values across the two pools define a particular combination of dual barcodes. Duplication of sequences within each pool is allowed; only pairs of the same barcodes are considered to be duplicates with respect to Options::duplicates.

Member Function Documentation

◆ get_counts()

template<size_t max_size>
const std::vector< int > & kaori::DualBarcodesPairedEnd< max_size >::get_counts ( ) const
inline
Returns
Vector containing the frequency of each valid combination. This has length equal to the number of valid dual barcode combinations (i.e., the length of barcode_pool1 and barcode_pool2 in the constructor). Each entry contains the count for the corresponding dual barcode combination.

◆ get_total()

template<size_t max_size>
int kaori::DualBarcodesPairedEnd< max_size >::get_total ( ) const
inline
Returns
Total number of read pairs processed by the handler.

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