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

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

#include <DualBarcodesPairedEndWithDiagnostics.hpp>

Public Member Functions

 DualBarcodesPairedEndWithDiagnostics (const char *template_seq1, SeqLength template_length1, const BarcodePool &barcode_pool1, const char *template_seq2, SeqLength template_length2, const BarcodePool &barcode_pool2, const typename DualBarcodesPairedEnd< max_size_ >::Options &options)
 
const std::vector< Count > & get_counts () const
 
const std::unordered_map< std::array< BarcodeIndex, 2 >, Count, CombinationHash< 2 > > & get_combinations () const
 
Count get_total () const
 
Count get_barcode1_only () const
 
Count get_barcode2_only () const
 

Detailed Description

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

Handler for dual barcodes with extra diagnostics.

This provides the same information as DualBarcodesPairedEnd but also captures the frequency of the invalid combinations. These frequences can be helpful for diagnosing problems with library construction. The handler also counts the number of reads where only one barcode construct matches to a read.

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

Constructor & Destructor Documentation

◆ DualBarcodesPairedEndWithDiagnostics()

template<SeqLength max_size_>
kaori::DualBarcodesPairedEndWithDiagnostics< max_size_ >::DualBarcodesPairedEndWithDiagnostics ( const char * template_seq1,
SeqLength template_length1,
const BarcodePool & barcode_pool1,
const char * template_seq2,
SeqLength template_length2,
const BarcodePool & barcode_pool2,
const typename DualBarcodesPairedEnd< max_size_ >::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 array pointed to by template_seq1. 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 array pointed to by template_seq2. 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.

See the DualBarcodesPairedEnd constructor for details.

Member Function Documentation

◆ get_barcode1_only()

template<SeqLength max_size_>
Count kaori::DualBarcodesPairedEndWithDiagnostics< 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<SeqLength max_size_>
Count kaori::DualBarcodesPairedEndWithDiagnostics< 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<SeqLength max_size_>
const std::unordered_map< std::array< BarcodeIndex, 2 >, Count, CombinationHash< 2 > > & kaori::DualBarcodesPairedEndWithDiagnostics< max_size_ >::get_combinations ( ) const
inline
Returns
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_>
const std::vector< Count > & kaori::DualBarcodesPairedEndWithDiagnostics< 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<SeqLength max_size_>
Count kaori::DualBarcodesPairedEndWithDiagnostics< 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: