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

Function mergePaths

PathOverlap/PathOverlap.cpp:490–507  ·  view source on GitHub ↗

Merge a sequence of overlapping paths. */

Source from the content-addressed store, hash-verified

488
489/** Merge a sequence of overlapping paths. */
490static ContigPath
491mergePaths(const Paths& paths, const OverlapMap& overlaps, const ContigPath& merge)
492{
493 assert(!merge.empty());
494 ContigNode u = merge.front();
495 ContigPath path(getPath(paths, u));
496 for (ContigPath::const_iterator it = merge.begin() + 1; it != merge.end(); ++it) {
497 ContigNode v = *it;
498 ContigPath vpath(getPath(paths, v));
499 unsigned overlap = getOverlap(overlaps, u, v);
500 assert(path.size() > overlap);
501 assert(vpath.size() > overlap);
502 assert(equal(path.end() - overlap, path.end(), vpath.begin()));
503 path.insert(path.end(), vpath.begin() + overlap, vpath.end());
504 u = v;
505 }
506 return path;
507}
508
509/** Return true if the edge e is a path overlap. */
510struct IsPathOverlap

Callers 1

assembleOverlappingPathsFunction · 0.70

Calls 8

getOverlapFunction · 0.85
getPathFunction · 0.70
emptyMethod · 0.45
frontMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
sizeMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected