| 687 | } |
| 688 | |
| 689 | static Resolution |
| 690 | resolveRepeats() |
| 691 | { |
| 692 | long total = (num_vertices(g_contigGraph) - num_vertices_removed(g_contigGraph)) / 2; |
| 693 | long repeats = 0; |
| 694 | long pathsSupported = 0, pathsUnsupported = 0; |
| 695 | std::vector<Support> supports; |
| 696 | |
| 697 | progressStart( |
| 698 | "Path resolution (r = " + std::to_string(g_vanillaBloom->get_k()) + ")", total * 2); |
| 699 | |
| 700 | Resolution resolution(ReadSize::current, g_vanillaBloom->get_k()); |
| 701 | |
| 702 | Graph::vertex_iterator vertexStart, vertexEnd; |
| 703 | boost::tie(vertexStart, vertexEnd) = vertices(g_contigGraph); |
| 704 | |
| 705 | iteratorMultithreading( |
| 706 | vertexStart, |
| 707 | vertexEnd, |
| 708 | [&](const ContigNode& node) { |
| 709 | if (!get(vertex_removed, g_contigGraph, node)) { |
| 710 | if (isSmallRepeat(node)) { |
| 711 | return true; |
| 712 | } else { |
| 713 | #pragma omp critical(cerr) |
| 714 | progressUpdate(); |
| 715 | return false; |
| 716 | } |
| 717 | } |
| 718 | return false; |
| 719 | }, |
| 720 | [&](const ContigNode& node) { |
| 721 | bool inHistSample; |
| 722 | bool skip = false; |
| 723 | #pragma omp critical(resolution) |
| 724 | { |
| 725 | repeats++; |
| 726 | inHistSample = (repeats <= HIST_SAMPLE_SIZE); |
| 727 | skip = (repeats > REPEAT_CASES_LIMIT); |
| 728 | } |
| 729 | |
| 730 | if (!skip) { |
| 731 | auto supportMap = buildRepeatSupportMap(node); |
| 732 | |
| 733 | #pragma omp critical(resolution) |
| 734 | { |
| 735 | resolution.repeatSupportMap[node.index()] = supportMap; |
| 736 | updateStats(resolution, supports, supportMap, inHistSample); |
| 737 | } |
| 738 | } |
| 739 | |
| 740 | #pragma omp critical(cerr) |
| 741 | progressUpdate(); |
| 742 | }); |
| 743 | |
| 744 | long pathsKnown = 0, pathsUnknown = 0, pathsTotal = 0; |
| 745 | static const std::string unknownReasonLabels[] = { "Undetermined", "Too many combinations", "Over max tests", "Possible tests < planned tests", "Window not long enough", "Head shorter than margin", "Tail shorter than margin", "Different culprit" }; |
| 746 | static const size_t unknownReasons = countof(unknownReasonLabels); |
no test coverage detected