diff --git a/docs/DualBarcodesWithDiagnostics_8hpp.html b/docs/DualBarcodesPairedEndWithDiagnostics_8hpp.html similarity index 89% rename from docs/DualBarcodesWithDiagnostics_8hpp.html rename to docs/DualBarcodesPairedEndWithDiagnostics_8hpp.html index 8411228..1cf457f 100644 --- a/docs/DualBarcodesWithDiagnostics_8hpp.html +++ b/docs/DualBarcodesPairedEndWithDiagnostics_8hpp.html @@ -5,7 +5,7 @@ -kaori: kaori/handlers/DualBarcodesWithDiagnostics.hpp File Reference +kaori: kaori/handlers/DualBarcodesPairedEndWithDiagnostics.hpp File Reference @@ -78,19 +78,19 @@
Classes | Namespaces
-
DualBarcodesWithDiagnostics.hpp File Reference
+
DualBarcodesPairedEndWithDiagnostics.hpp File Reference

Process dual barcodes with extra diagnostics. More...

-

Go to the source code of this file.

+

Go to the source code of this file.

- - + +

Classes

class  kaori::DualBarcodesWithDiagnostics< max_size >
 Handler for dual barcodes with extra diagnostics. More...
class  kaori::DualBarcodesPairedEndWithDiagnostics< max_size >
 Handler for dual barcodes with extra diagnostics. More...
 
- +

diff --git a/docs/DualBarcodesWithDiagnostics_8hpp_source.html b/docs/DualBarcodesPairedEndWithDiagnostics_8hpp_source.html similarity index 58% rename from docs/DualBarcodesWithDiagnostics_8hpp_source.html rename to docs/DualBarcodesPairedEndWithDiagnostics_8hpp_source.html index 707eede..a23ce89 100644 --- a/docs/DualBarcodesWithDiagnostics_8hpp_source.html +++ b/docs/DualBarcodesPairedEndWithDiagnostics_8hpp_source.html @@ -5,7 +5,7 @@ -kaori: kaori/handlers/DualBarcodesWithDiagnostics.hpp Source File +kaori: kaori/handlers/DualBarcodesPairedEndWithDiagnostics.hpp Source File @@ -75,25 +75,25 @@
-
DualBarcodesWithDiagnostics.hpp
+
DualBarcodesPairedEndWithDiagnostics.hpp
-Go to the documentation of this file.
1#ifndef KAORI_DUAL_BARCODES_WITH_DIAGNOSTICS_HPP
-
2#define KAORI_DUAL_BARCODES_WITH_DIAGNOSTICS_HPP
+Go to the documentation of this file.
1#ifndef KAORI_DUAL_BARCODES_PAIRED_END_WITH_DIAGNOSTICS_HPP
+
2#define KAORI_DUAL_BARCODES_PAIRED_END_WITH_DIAGNOSTICS_HPP
3
-
4#include "DualBarcodes.hpp"
+
6#include "../utils.hpp"
7
14namespace kaori {
15
25template<size_t max_size>
- +
27public:
- +
45 const char* template_seq1, size_t template_length1, const BarcodePool& barcode_pool1,
46 const char* template_seq2, size_t template_length2, const BarcodePool& barcode_pool2,
-
47 const typename DualBarcodes<max_size>::Options& options
+
47 const typename DualBarcodesPairedEnd<max_size>::Options& options
48 ) :
49 dual_handler(template_seq1, template_length1, barcode_pool1, template_seq2, template_length2, barcode_pool2, options),
50
@@ -106,31 +106,31 @@
57 barcode_pool2,
58 [&]{
-
60 combopt.use_first = options.use_first;
+
60 combopt.use_first = options.use_first;
61
-
62 combopt.max_mismatches1 = options.max_mismatches1;
-
63 combopt.strand1 = options.strand1;
-
64 combopt.max_mismatches2 = options.max_mismatches2;
-
65 combopt.strand2 = options.strand2;
+
62 combopt.max_mismatches1 = options.max_mismatches1;
+
63 combopt.strand1 = options.strand1;
+
64 combopt.max_mismatches2 = options.max_mismatches2;
+
65 combopt.strand2 = options.strand2;
66
67 // we allow duplicates in the trie for each individual barcode, as only the pairs are unique in the dual barcode setup.
68 combopt.duplicates = DuplicateAction::FIRST;
-
69 combopt.random = options.random;
+
69 combopt.random = options.random;
70 return combopt;
71 }()
72 )
73 {}
74
75private:
-
76 DualBarcodes<max_size> dual_handler;
+
76 DualBarcodesPairedEnd<max_size> dual_handler;
77 CombinatorialBarcodesPairedEnd<max_size> combo_handler;
78
79public:
83 struct State {
84 State() {}
-
85 State(typename DualBarcodes<max_size>::State ds, typename CombinatorialBarcodesPairedEnd<max_size>::State cs) : dual_state(std::move(ds)), combo_state(std::move(cs)) {}
+
85 State(typename DualBarcodesPairedEnd<max_size>::State ds, typename CombinatorialBarcodesPairedEnd<max_size>::State cs) : dual_state(std::move(ds)), combo_state(std::move(cs)) {}
86
-
90 typename DualBarcodes<max_size>::State dual_state;
+
90 typename DualBarcodesPairedEnd<max_size>::State dual_state;
91 typename CombinatorialBarcodesPairedEnd<max_size>::State combo_state;
95 };
96
@@ -152,54 +152,57 @@
119 }
120 }
125public:
-
130 void sort() {
+
130 void sort() {
131 combo_handler.sort();
132 }
133
-
139 const std::vector<int>& get_counts() const {
+
139 const std::vector<int>& get_counts() const {
140 return dual_handler.get_counts();
141 }
142
-
147 const std::vector<std::array<int, 2> >& get_combinations() const {
+
147 const std::vector<std::array<int, 2> >& get_combinations() const {
148 return combo_handler.get_combinations();
149 }
150
-
154 int get_total() const {
+
154 int get_total() const {
155 return dual_handler.get_total();
156 }
157
-
161 int get_barcode1_only() const {
+
161 int get_barcode1_only() const {
162 return combo_handler.get_barcode1_only();
163 }
164
-
168 int get_barcode2_only() const {
+
168 int get_barcode2_only() const {
169 return combo_handler.get_barcode2_only();
170 }
171};
172
-
173}
-
174
-
175#endif
+
176// Soft-deprecated back-compatible aliases.
+
177template<size_t max_size>
+
178using DualBarcodesWithDiagnostics = DualBarcodesPairedEndWithDiagnostics<max_size>;
+
183}
+
184
+
185#endif
Process paired-end combinatorial barcodes.
-
Process dual barcodes.
+
Process dual barcodes.
Handler for paired-end combinatorial barcodes.
Definition: CombinatorialBarcodesPairedEnd.hpp:29
-
Handler for dual barcodes with extra diagnostics.
Definition: DualBarcodesWithDiagnostics.hpp:26
-
int get_barcode1_only() const
Definition: DualBarcodesWithDiagnostics.hpp:161
-
const std::vector< int > & get_counts() const
Definition: DualBarcodesWithDiagnostics.hpp:139
-
int get_total() const
Definition: DualBarcodesWithDiagnostics.hpp:154
-
const std::vector< std::array< int, 2 > > & get_combinations() const
Definition: DualBarcodesWithDiagnostics.hpp:147
-
int get_barcode2_only() const
Definition: DualBarcodesWithDiagnostics.hpp:168
-
DualBarcodesWithDiagnostics(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 typename DualBarcodes< max_size >::Options &options)
Definition: DualBarcodesWithDiagnostics.hpp:44
-
void sort()
Definition: DualBarcodesWithDiagnostics.hpp:130
+
Handler for dual barcodes with extra diagnostics.
Definition: DualBarcodesPairedEndWithDiagnostics.hpp:26
+
const std::vector< std::array< int, 2 > > & get_combinations() const
Definition: DualBarcodesPairedEndWithDiagnostics.hpp:147
+
const std::vector< int > & get_counts() const
Definition: DualBarcodesPairedEndWithDiagnostics.hpp:139
+
DualBarcodesPairedEndWithDiagnostics(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 typename DualBarcodesPairedEnd< max_size >::Options &options)
Definition: DualBarcodesPairedEndWithDiagnostics.hpp:44
+
int get_barcode2_only() const
Definition: DualBarcodesPairedEndWithDiagnostics.hpp:168
+
void sort()
Definition: DualBarcodesPairedEndWithDiagnostics.hpp:130
+
int get_barcode1_only() const
Definition: DualBarcodesPairedEndWithDiagnostics.hpp:161
+
int get_total() const
Definition: DualBarcodesPairedEndWithDiagnostics.hpp:154
Namespace for the kaori barcode-matching library.
Definition: BarcodePool.hpp:13
Pool of barcode sequences for a variable region.
Definition: BarcodePool.hpp:21
-
Optional parameters for SingleBarcodeSingleEnd.
Definition: DualBarcodes.hpp:32
-
SearchStrand strand1
Definition: DualBarcodes.hpp:48
-
bool random
Definition: DualBarcodes.hpp:71
-
bool use_first
Definition: DualBarcodes.hpp:37
-
SearchStrand strand2
Definition: DualBarcodes.hpp:59
-
int max_mismatches1
Definition: DualBarcodes.hpp:42
-
int max_mismatches2
Definition: DualBarcodes.hpp:53
+
Optional parameters for DualBarcodesPairedEnd.
Definition: DualBarcodesPairedEnd.hpp:32
+
int max_mismatches1
Definition: DualBarcodesPairedEnd.hpp:42
+
bool random
Definition: DualBarcodesPairedEnd.hpp:71
+
int max_mismatches2
Definition: DualBarcodesPairedEnd.hpp:53
+
SearchStrand strand2
Definition: DualBarcodesPairedEnd.hpp:59
+
bool use_first
Definition: DualBarcodesPairedEnd.hpp:37
+
SearchStrand strand1
Definition: DualBarcodesPairedEnd.hpp:48

Process dual barcodes. More...

-

Go to the source code of this file.

+

Go to the source code of this file.

- - + + - - + +

Classes

class  kaori::DualBarcodes< max_size >
 Handler for dual barcodes. More...
class  kaori::DualBarcodesPairedEnd< max_size >
 Handler for dual barcodes. More...
 
struct  kaori::DualBarcodes< max_size >::Options
 Optional parameters for SingleBarcodeSingleEnd. More...
struct  kaori::DualBarcodesPairedEnd< max_size >::Options
 Optional parameters for DualBarcodesPairedEnd. More...
 
- - - + + + diff --git a/docs/classes.html b/docs/classes.html index e196582..607aeb8 100644 --- a/docs/classes.html +++ b/docs/classes.html @@ -87,7 +87,7 @@
CombinatorialBarcodesPairedEnd (kaori)
CombinatorialBarcodesSingleEnd (kaori)
D
-
DualBarcodes (kaori)
DualBarcodesWithDiagnostics (kaori)
+
DualBarcodesPairedEnd (kaori)
DualBarcodesPairedEndWithDiagnostics (kaori)
F
FastqReader (kaori)
@@ -96,7 +96,7 @@
MismatchTrie (kaori)
O
-
CombinatorialBarcodesSingleEnd::Options (kaori)
DualBarcodes::Options (kaori)
RandomBarcodeSingleEnd::Options (kaori)
SegmentedBarcodeSearch::Options (kaori)
SimpleBarcodeSearch::Options (kaori)
SimpleSingleMatch::Options (kaori)
SingleBarcodePairedEnd::Options (kaori)
SingleBarcodeSingleEnd::Options (kaori)
+
CombinatorialBarcodesSingleEnd::Options (kaori)
DualBarcodesPairedEnd::Options (kaori)
RandomBarcodeSingleEnd::Options (kaori)
SegmentedBarcodeSearch::Options (kaori)
SimpleBarcodeSearch::Options (kaori)
SimpleSingleMatch::Options (kaori)
SingleBarcodePairedEnd::Options (kaori)
SingleBarcodeSingleEnd::Options (kaori)
R
RandomBarcodeSingleEnd (kaori)
SegmentedMismatches::Result (kaori)
diff --git a/docs/classkaori_1_1DualBarcodes-members.html b/docs/classkaori_1_1DualBarcodesPairedEnd-members.html similarity index 72% rename from docs/classkaori_1_1DualBarcodes-members.html rename to docs/classkaori_1_1DualBarcodesPairedEnd-members.html index efa1c6a..aaaba66 100644 --- a/docs/classkaori_1_1DualBarcodes-members.html +++ b/docs/classkaori_1_1DualBarcodesPairedEnd-members.html @@ -71,19 +71,19 @@
-
kaori::DualBarcodes< max_size > Member List
+
kaori::DualBarcodesPairedEnd< max_size > Member List
-

This is the complete list of members for kaori::DualBarcodes< max_size >, including all inherited members.

+

This is the complete list of members for kaori::DualBarcodesPairedEnd< max_size >, including all inherited members.

diff --git a/docs/DualBarcodes_8hpp_source.html b/docs/DualBarcodesPairedEnd_8hpp_source.html similarity index 84% rename from docs/DualBarcodes_8hpp_source.html rename to docs/DualBarcodesPairedEnd_8hpp_source.html index b7d95b6..b0dabac 100644 --- a/docs/DualBarcodes_8hpp_source.html +++ b/docs/DualBarcodesPairedEnd_8hpp_source.html @@ -5,7 +5,7 @@ -kaori: kaori/handlers/DualBarcodes.hpp Source File +kaori: kaori/handlers/DualBarcodesPairedEnd.hpp Source File @@ -75,10 +75,10 @@
-
DualBarcodes.hpp
+
DualBarcodesPairedEnd.hpp
-Go to the documentation of this file.
1#ifndef KAORI_DUAL_BARCODES_HPP
+Go to the documentation of this file.
1#ifndef KAORI_DUAL_BARCODES_HPP
2#define KAORI_DUAL_BARCODES_HPP
3
4#include "../ScanTemplate.hpp"
@@ -88,29 +88,29 @@
14namespace kaori {
15
26template<size_t max_size>
- +
28public:
-
32 struct Options {
-
37 bool use_first = true;
+
32 struct Options {
+
37 bool use_first = true;
38
- +
43
-
48 SearchStrand strand1 = SearchStrand::FORWARD;
+
48 SearchStrand strand1 = SearchStrand::FORWARD;
49
- +
54
-
59 SearchStrand strand2 = SearchStrand::FORWARD;
+
59 SearchStrand strand2 = SearchStrand::FORWARD;
60
-
64 DuplicateAction duplicates = DuplicateAction::ERROR;
+
64 DuplicateAction duplicates = DuplicateAction::ERROR;
65
-
71 bool random = false;
+
71 bool random = false;
72 };
73
74public:
- +
93 const char* template_seq1, size_t template_length1, const BarcodePool& barcode_pool1,
94 const char* template_seq2, size_t template_length2, const BarcodePool& barcode_pool2,
-
95 const Options& options
+
95 const Options& options
96 ) :
97 search_reverse1(search_reverse(options.strand1)),
98 search_reverse2(search_reverse(options.strand2)),
@@ -189,7 +189,7 @@
171 [&]{
173 bopt.max_mismatches = { max_mm1, max_mm2 };
-
174 bopt.duplicates = options.duplicates;
+
174 bopt.duplicates = options.duplicates;
175 bopt.reverse = false; // we already handle strandedness when creating 'combined_set'.
176 return bopt;
177 }()
@@ -392,22 +392,25 @@
388 int total = 0;
389
390public:
-
396 const std::vector<int>& get_counts() const {
+
396 const std::vector<int>& get_counts() const {
397 return counts;
398 }
399
-
403 int get_total() const {
+
403 int get_total() const {
404 return total;
405 }
406};
407
-
408}
-
409
-
410#endif
-
Handler for dual barcodes.
Definition: DualBarcodes.hpp:27
-
DualBarcodes(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)
Definition: DualBarcodes.hpp:92
-
const std::vector< int > & get_counts() const
Definition: DualBarcodes.hpp:396
-
int get_total() const
Definition: DualBarcodes.hpp:403
+
411// Soft-deprecated back-compatible aliases.
+
412template<size_t max_size>
+
413using DualBarcodes = DualBarcodesPairedEnd<max_size>;
+
418}
+
419
+
420#endif
+
Handler for dual barcodes.
Definition: DualBarcodesPairedEnd.hpp:27
+
const std::vector< int > & get_counts() const
Definition: DualBarcodesPairedEnd.hpp:396
+
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)
Definition: DualBarcodesPairedEnd.hpp:92
+
int get_total() const
Definition: DualBarcodesPairedEnd.hpp:403
Search for known barcode sequences with segmented mismatches.
Definition: BarcodeSearch.hpp:290
void reduce(State &state)
Definition: BarcodeSearch.hpp:423
void search(const std::string &search_seq, State &state) const
Definition: BarcodeSearch.hpp:461
@@ -415,14 +418,14 @@
Pool of barcode sequences for a variable region.
Definition: BarcodePool.hpp:21
size_t length
Definition: BarcodePool.hpp:59
size_t size() const
Definition: BarcodePool.hpp:64
-
Optional parameters for SingleBarcodeSingleEnd.
Definition: DualBarcodes.hpp:32
-
SearchStrand strand1
Definition: DualBarcodes.hpp:48
-
bool random
Definition: DualBarcodes.hpp:71
-
bool use_first
Definition: DualBarcodes.hpp:37
-
SearchStrand strand2
Definition: DualBarcodes.hpp:59
-
int max_mismatches1
Definition: DualBarcodes.hpp:42
-
DuplicateAction duplicates
Definition: DualBarcodes.hpp:64
-
int max_mismatches2
Definition: DualBarcodes.hpp:53
+
Optional parameters for DualBarcodesPairedEnd.
Definition: DualBarcodesPairedEnd.hpp:32
+
int max_mismatches1
Definition: DualBarcodesPairedEnd.hpp:42
+
bool random
Definition: DualBarcodesPairedEnd.hpp:71
+
int max_mismatches2
Definition: DualBarcodesPairedEnd.hpp:53
+
SearchStrand strand2
Definition: DualBarcodesPairedEnd.hpp:59
+
DuplicateAction duplicates
Definition: DualBarcodesPairedEnd.hpp:64
+
bool use_first
Definition: DualBarcodesPairedEnd.hpp:37
+
SearchStrand strand1
Definition: DualBarcodesPairedEnd.hpp:48
Optional parameters for a SegmentedBarcodeSearch.
Definition: BarcodeSearch.hpp:295
std::array< int, num_segments > max_mismatches
Definition: BarcodeSearch.hpp:309
bool reverse
Definition: BarcodeSearch.hpp:315
diff --git a/docs/annotated.html b/docs/annotated.html index a01c355..e2e6567 100644 --- a/docs/annotated.html +++ b/docs/annotated.html @@ -82,9 +82,9 @@

 CCombinatorialBarcodesPairedEndHandler for paired-end combinatorial barcodes
 CCombinatorialBarcodesSingleEndHandler for single-end combinatorial barcodes
 COptionsOptional parameters for CombinatorialBarcodeSingleEnd
 CDualBarcodesHandler for dual barcodes
 COptionsOptional parameters for SingleBarcodeSingleEnd
 CDualBarcodesWithDiagnosticsHandler for dual barcodes with extra diagnostics
 CDualBarcodesPairedEndHandler for dual barcodes
 COptionsOptional parameters for DualBarcodesPairedEnd
 CDualBarcodesPairedEndWithDiagnosticsHandler for dual barcodes with extra diagnostics
 CFastqReaderStream reads from a FASTQ file
 CMismatchTrieBase class for the mismatch search
 CAddStatusStatus of the barcode sequence addition
- - - + + +
DualBarcodes(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)kaori::DualBarcodes< max_size >inline
get_counts() constkaori::DualBarcodes< max_size >inline
get_total() constkaori::DualBarcodes< max_size >inline
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)kaori::DualBarcodesPairedEnd< max_size >inline
get_counts() constkaori::DualBarcodesPairedEnd< max_size >inline
get_total() constkaori::DualBarcodesPairedEnd< max_size >inline

DuplicateAction kaori::DualBarcodes< max_size >::Options::duplicates = DuplicateAction::ERRORDuplicateAction kaori::DualBarcodesPairedEnd< max_size >::Options::duplicates = DuplicateAction::ERROR
@@ -125,8 +125,8 @@

-

◆ max_mismatches1

+ +

◆ max_mismatches1

@@ -134,7 +134,7 @@

- int kaori::DualBarcodes< max_size >::Options::max_mismatches1 = 0 + int kaori::DualBarcodesPairedEnd< max_size >::Options::max_mismatches1 = 0

@@ -142,8 +142,8 @@

-

◆ max_mismatches2

+ +

◆ max_mismatches2

@@ -151,7 +151,7 @@

- int kaori::DualBarcodes< max_size >::Options::max_mismatches2 = 0 + int kaori::DualBarcodesPairedEnd< max_size >::Options::max_mismatches2 = 0

@@ -159,8 +159,8 @@

-

◆ random

+ +

◆ random

@@ -168,7 +168,7 @@

- bool kaori::DualBarcodes< max_size >::Options::random = false + bool kaori::DualBarcodesPairedEnd< max_size >::Options::random = false

@@ -176,8 +176,8 @@

-

◆ strand1

+ +

◆ strand1

@@ -185,7 +185,7 @@

- SearchStrand kaori::DualBarcodes< max_size >::Options::strand1 = SearchStrand::FORWARD + SearchStrand kaori::DualBarcodesPairedEnd< max_size >::Options::strand1 = SearchStrand::FORWARD

@@ -193,8 +193,8 @@

-

◆ strand2

+ +

◆ strand2

@@ -202,7 +202,7 @@

- SearchStrand kaori::DualBarcodes< max_size >::Options::strand2 = SearchStrand::FORWARD + SearchStrand kaori::DualBarcodesPairedEnd< max_size >::Options::strand2 = SearchStrand::FORWARD

@@ -210,8 +210,8 @@

-

◆ use_first

+ +

◆ use_first

@@ -219,7 +219,7 @@

- bool kaori::DualBarcodes< max_size >::Options::use_first = true + bool kaori::DualBarcodesPairedEnd< max_size >::Options::use_first = true

@@ -228,7 +228,7 @@

DualBarcodes.hpp +
  • kaori/handlers/DualBarcodesPairedEnd.hpp