MCPcopy Create free account
hub / github.com/BirolLab/abyss / resolveRepeats

Function resolveRepeats

RResolver/RAlgorithmsShort.cpp:689–834  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

687}
688
689static Resolution
690resolveRepeats()
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);

Callers 1

resolveShortFunction · 0.85

Calls 13

num_vertices_removedFunction · 0.85
progressStartFunction · 0.85
iteratorMultithreadingFunction · 0.85
isSmallRepeatFunction · 0.85
progressUpdateFunction · 0.85
buildRepeatSupportMapFunction · 0.85
updateStatsFunction · 0.85
countofFunction · 0.85
unknownMethod · 0.80
num_verticesFunction · 0.50
verticesFunction · 0.50
getFunction · 0.50

Tested by

no test coverage detected