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

Function trimOverlaps

PathOverlap/PathOverlap.cpp:390–407  ·  view source on GitHub ↗

Find the largest overlap for each contig and remove it. */

Source from the content-addressed store, hash-verified

388
389/** Find the largest overlap for each contig and remove it. */
390static void
391trimOverlaps(Paths& paths, const Overlaps& overlaps)
392{
393 vector<unsigned> removed[2];
394 removed[0].resize(paths.size());
395 removed[1].resize(paths.size());
396
397 for (Overlaps::const_iterator it = overlaps.begin(); it != overlaps.end(); ++it) {
398 unsigned& a = removed[!it->source.sense][it->source.id];
399 unsigned& b = removed[it->target.sense][it->target.id];
400 a = max(a, it->overlap);
401 b = max(b, it->overlap);
402 }
403
404 for (Paths::iterator it = paths.begin(); it != paths.end(); ++it)
405 removeContigs(
406 *it, removed[0][it - paths.begin()], it->size() - removed[1][it - paths.begin()]);
407}
408
409/** Trim the ends of paths that overlap another path. */
410static void

Callers 1

mainFunction · 0.85

Calls 7

resizeMethod · 0.80
removeContigsFunction · 0.70
findOverlapsFunction · 0.70
sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected