kaori
A C++ library for barcode extraction and matching
Loading...
Searching...
No Matches
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, SeqLength template_length, const std::vector< BarcodePool > &barcode_pools, const typename DualBarcodesSingleEnd< max_size_ >::Options &options)
 
const std::vector< Count > & get_counts () const
 
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::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_size_Maximum length of the template sequences on both reads.
num_variable_Number of the template sequences on both reads.

Constructor & Destructor Documentation

◆ DualBarcodesSingleEndWithDiagnostics()

template<SeqLength max_size_, int num_variable_>
kaori::DualBarcodesSingleEndWithDiagnostics< max_size_, num_variable_ >::DualBarcodesSingleEndWithDiagnostics ( const char * template_seq,
SeqLength template_length,
const std::vector< BarcodePool > & barcode_pools,
const typename DualBarcodesSingleEnd< max_size_ >::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_combinations()

template<SeqLength max_size_, int num_variable_>
const std::unordered_map< std::array< BarcodeIndex, num_variable_ >, Count, CombinationHash< num_variable_ > > & kaori::DualBarcodesSingleEndWithDiagnostics< max_size_, num_variable_ >::get_combinations ( ) const
inline
Returns
All invalid combinations encountered by the handler, along with their frequencies. In each array, the first and second element contains the indices of known barcodes in the first and second pools, respectively.

◆ get_counts()

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

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