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

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

#include <CombinatorialBarcodesPairedEnd.hpp>

Public Member Functions

 CombinatorialBarcodesPairedEnd (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)
 
void sort ()
 
const std::vector< std::array< int, 2 > > & get_combinations () const
 
int get_total () const
 
int get_barcode1_only () const
 
int get_barcode2_only () const
 

Detailed Description

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

Handler for paired-end combinatorial 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. Combinations are assembled randomly by library construction, where the large number of combinations provide many unique identifiers 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.

Constructor & Destructor Documentation

◆ CombinatorialBarcodesPairedEnd()

template<size_t max_size>
kaori::CombinatorialBarcodesPairedEnd< max_size >::CombinatorialBarcodesPairedEnd ( 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.

Member Function Documentation

◆ get_barcode1_only()

template<size_t max_size>
int kaori::CombinatorialBarcodesPairedEnd< max_size >::get_barcode1_only ( ) const
inline
Returns
Number of read pairs with a valid match to the first barcode but no valid match to the second barcode.

◆ get_barcode2_only()

template<size_t max_size>
int kaori::CombinatorialBarcodesPairedEnd< max_size >::get_barcode2_only ( ) const
inline
Returns
Number of read pairs with a valid match to the second barcode but no valid match to the first barcode.

◆ get_combinations()

template<size_t max_size>
const std::vector< std::array< int, 2 > > & kaori::CombinatorialBarcodesPairedEnd< max_size >::get_combinations ( ) const
inline
Returns
All combinations encountered by the handler. In each array, the first and second element contains the indices of known barcodes in the first and second pools, respectively.

◆ get_total()

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

◆ sort()

template<size_t max_size>
void kaori::CombinatorialBarcodesPairedEnd< max_size >::sort ( )
inline

Sort the combinations for easier frequency counting. Combinations are sorted by the first index, and then the second index.


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