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

Function buildRepeatSupportMap

RResolver/RAlgorithmsShort.cpp:607–645  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

605}
606
607static SupportMap
608buildRepeatSupportMap(const ContigNode& repeat)
609{
610 SupportMap supportMap;
611 bool unknown = false;
612 in_edge_iterator inIt, inLast;
613 for (std::tie(inIt, inLast) = in_edges(repeat, g_contigGraph); inIt != inLast; ++inIt) {
614 const auto intig = source(*inIt, g_contigGraph);
615 out_edge_iterator outIt, outLast;
616 for (std::tie(outIt, outLast) = out_edges(repeat, g_contigGraph); outIt != outLast;
617 ++outIt) {
618 const auto outig = target(*outIt, g_contigGraph);
619 auto support = determinePathSupport({ intig, repeat, outig });
620
621 supportMap[intig.index()][outig.index()] = support;
622 if (support.unknown()) {
623 unknown = true;
624 }
625 }
626 }
627
628 if (unknown) {
629 for (std::tie(inIt, inLast) = in_edges(repeat, g_contigGraph); inIt != inLast; ++inIt) {
630 const auto intig = source(*inIt, g_contigGraph);
631 out_edge_iterator outIt, outLast;
632 for (std::tie(outIt, outLast) = out_edges(repeat, g_contigGraph); outIt != outLast;
633 ++outIt) {
634 const auto outig = target(*outIt, g_contigGraph);
635 auto& support = supportMap[intig.index()][outig.index()];
636 if (!support.unknown()) {
637 support.reset();
638 support.unknownReason = Support::UnknownReason::DIFFERENT_CULPRIT;
639 }
640 }
641 }
642 }
643
644 return supportMap;
645}
646
647static void
648updateStats(

Callers 1

resolveRepeatsFunction · 0.85

Calls 5

unknownMethod · 0.80
in_edgesFunction · 0.50
out_edgesFunction · 0.50
indexMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected