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

Handler for dual barcodes with extra diagnostics. More...

#include <DualBarcodesSingleEndWithDiagnostics.hpp>

Public Member Functions

 DualBarcodesSingleEndWithDiagnostics (const char *template_seq, size_t template_length, const std::vector< BarcodePool > &barcode_pools, const typename DualBarcodesSingleEnd< max_size >::Options &options)
 
void sort ()
 
const std::vector< int > & get_counts () const
 
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::DualBarcodesSingleEndWithDiagnostics< max_size, num_variable >

Handler for dual barcodes with extra diagnostics.

This provides the same information as DualBarcodesSingleEnd but also captures the frequency of the invalid combinations. These frequences can be helpful for diagnosing problems with library construction.

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

Constructor & Destructor Documentation

◆ DualBarcodesSingleEndWithDiagnostics()

template<size_t max_size, size_t num_variable>
kaori::DualBarcodesSingleEndWithDiagnostics< max_size, num_variable >::DualBarcodesSingleEndWithDiagnostics ( const char *  template_seq,
size_t  template_length,
const std::vector< BarcodePool > &  barcode_pools,
const typename DualBarcodesSingleEnd< max_size >::Options &  options 
)
inline
Parameters
[in]template_seqPointer to a character array containing the template sequence.
template_lengthLength of the template. This should be less than or equal to max_size.
barcode_poolsPools of known barcode sequences for each variable region in the template. Each pool should have the same length, and corresponding values across pools define a specific combination of barcodes.
optionsOptional parameters.

Member Function Documentation

◆ get_combinations()

template<size_t max_size, size_t num_variable>
const std::vector< std::array< int, num_variable > > & kaori::DualBarcodesSingleEndWithDiagnostics< max_size, num_variable >::get_combinations ( ) const
inline
Returns
All invalid 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_counts()

template<size_t max_size, size_t num_variable>
const std::vector< int > & kaori::DualBarcodesSingleEndWithDiagnostics< max_size, num_variable >::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, size_t num_variable>
int kaori::DualBarcodesSingleEndWithDiagnostics< max_size, num_variable >::get_total ( ) const
inline
Returns
Total number of reads processed by the handler.

◆ sort()

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

Sort the invalid 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: