diff --git a/docs/DualBarcodesPairedEnd_8hpp_source.html b/docs/DualBarcodesPairedEnd_8hpp_source.html
index a6d02d3..60f5383 100644
--- a/docs/DualBarcodesPairedEnd_8hpp_source.html
+++ b/docs/DualBarcodesPairedEnd_8hpp_source.html
@@ -322,106 +322,104 @@
311 auto deets1 = constant1.initialize(against1.first, against1.second - against1.first);
312 auto deets2 = constant2.initialize(against2.first, against2.second - against2.first);
- 314 state.second_matches.clear();
-
- 316 int best_mismatches = max_mm1 + max_mm2 + 1;
-
- 318 auto checker = [&](
size_t idx2) ->
void {
- 319 const auto& current2 = state.second_matches[idx2];
- 320 state.combined = state.first_match.first;
- 321 state.combined += current2.first;
- 322 varlib.search(state.combined, state.details, std::array<int, 2>{ max_mm1 - state.first_match.second, max_mm2 - current2.second });
+
+
+
+ 317 state.second_matches.clear();
+ 318 while (inner_process(search_reverse2, constant2, max_mm2, against2.first, deets2, state.second_matches)) {}
+
+
+ 321 int best_mismatches = max_mm1 + max_mm2 + 1;
+ 322 size_t num_second_matches = state.second_matches.size();
- 324 int cur_mismatches = state.details.mismatches;
- 325 if (cur_mismatches < best_mismatches) {
- 326 chosen = state.details.index;
- 327 best_mismatches = cur_mismatches;
- 328 }
else if (cur_mismatches == best_mismatches && chosen != state.details.index) {
-
-
-
+ 324 if (!state.second_matches.empty()) {
+ 325 while (inner_process(search_reverse1, constant1, max_mm1, against1.first, deets1, state.first_match)) {
+ 326 for (
size_t i = 0; i < num_second_matches; ++i) {
+ 327 const auto& current2 = state.second_matches[i];
+
+ 329 state.combined = state.first_match.first;
+ 330 state.combined += current2.first;
+ 331 varlib.search(state.combined, state.details, std::array<int, 2>{ max_mm1 - state.first_match.second, max_mm2 - current2.second });
-
-
-
- 336 while (inner_process(search_reverse2, constant2, max_mm2, against2.first, deets2, state.second_matches)) {
- 337 checker(state.second_matches.size() - 1);
-
-
- 340 if (!state.second_matches.empty()) {
- 341 while (inner_process(search_reverse1, constant1, max_mm1, against1.first, deets1, state.first_match)) {
- 342 for (
size_t i = 0; i < state.second_matches.size(); ++i) {
-
-
-
-
-
- 348 return std::make_pair(chosen, best_mismatches);
-
-
-
- 355 bool process(State& state,
const std::pair<const char*, const char*>& r1,
const std::pair<const char*, const char*>& r2)
const {
-
-
-
- 359 found = process_first(state, r1, r2);
- 360 if (!found && randomized) {
- 361 found = process_first(state, r2, r1);
-
-
-
- 365 auto best = process_best(state, r1, r2);
-
- 367 auto best2 = process_best(state, r2, r1);
- 368 if (best.first < 0 || best.second > best2.second) {
-
- 370 }
else if (best.second == best2.second && best.first != best2.first) {
-
-
-
-
- 375 found = best.first >= 0;
-
- 377 ++state.counts[best.first];
-
-
-
-
-
-
-
- 389 bool search_reverse1, search_reverse2;
-
- 391 ScanTemplate<max_size> constant1, constant2;
- 392 SegmentedBarcodeSearch<2> varlib;
- 393 int max_mm1, max_mm2;
-
-
- 396 bool use_first =
true;
-
- 398 std::vector<int> counts;
-
-
-
-
-
-
-
-
-
-
-
-
-
- 423template<
size_t max_size>
- 424using DualBarcodes = DualBarcodesPairedEnd<max_size>;
-
-
-
+ 333 if (state.details.index >= 0) {
+ 334 int cur_mismatches = state.details.mismatches + state.first_match.second + current2.second;
+ 335 if (cur_mismatches < best_mismatches) {
+ 336 chosen = state.details.index;
+ 337 best_mismatches = cur_mismatches;
+ 338 }
else if (cur_mismatches == best_mismatches && chosen != state.details.index) {
+
+
+
+
+
+
+
+ 346 return std::make_pair(chosen, best_mismatches);
+
+
+
+ 353 bool process(State& state,
const std::pair<const char*, const char*>& r1,
const std::pair<const char*, const char*>& r2)
const {
+
+
+
+ 357 found = process_first(state, r1, r2);
+ 358 if (!found && randomized) {
+ 359 found = process_first(state, r2, r1);
+
+
+
+ 363 auto best = process_best(state, r1, r2);
+
+ 365 auto best2 = process_best(state, r2, r1);
+ 366 if (best.first < 0 || best.second > best2.second) {
+
+ 368 }
else if (best.second == best2.second && best.first != best2.first) {
+
+
+
+
+ 373 found = best.first >= 0;
+
+ 375 ++state.counts[best.first];
+
+
+
+
+
+
+
+ 387 bool search_reverse1, search_reverse2;
+
+ 389 ScanTemplate<max_size> constant1, constant2;
+ 390 SegmentedBarcodeSearch<2> varlib;
+ 391 int max_mm1, max_mm2;
+
+
+ 394 bool use_first =
true;
+
+ 396 std::vector<int> counts;
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 421template<
size_t max_size>
+ 422using DualBarcodes = DualBarcodesPairedEnd<max_size>;
+
+
+
Handler for dual barcodes.
Definition: DualBarcodesPairedEnd.hpp:27
-const std::vector< int > & get_counts() const
Definition: DualBarcodesPairedEnd.hpp:407
+const std::vector< int > & get_counts() const
Definition: DualBarcodesPairedEnd.hpp:405
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:414
+int get_total() const
Definition: DualBarcodesPairedEnd.hpp:412
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