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

Function findOverlaps

PathOverlap/PathOverlap.cpp:306–335  ·  view source on GitHub ↗

Find every path that overlaps with the specified path. */

Source from the content-addressed store, hash-verified

304
305/** Find every path that overlaps with the specified path. */
306static void
307findOverlaps(
308 const Graph& g,
309 const Paths& paths,
310 const SeedMap& seedMap,
311 const Vertex& v,
312 Overlaps& overlaps)
313{
314 ContigPath rc;
315 if (v.sense) {
316 rc = paths[v.id];
317 reverseComplement(rc.begin(), rc.end());
318 }
319 const ContigPath& path = v.sense ? rc : paths[v.id];
320
321 for (ContigPath::const_iterator it = path.begin(); it != path.end(); ++it) {
322 if (it->ambiguous())
323 continue;
324
325 pair<SeedMap::const_iterator, SeedMap::const_iterator> range = seedMap.equal_range(*it);
326 for (SeedMap::const_iterator seed = range.first; seed != range.second; ++seed) {
327 if (v == seed->second)
328 continue;
329 int distance = 0;
330 unsigned overlap = findOverlap(g, paths, it, path.end(), seed->second, distance);
331 if (overlap > 0)
332 overlaps.push_back(Overlap(v, seed->second, overlap, distance));
333 }
334 }
335}
336
337/** Find every pair of overlapping paths. */
338static Overlaps

Callers 3

trimOverlapsFunction · 0.70
assembleOverlappingPathsFunction · 0.70
mainFunction · 0.70

Calls 10

makeSeedMapFunction · 0.85
ambiguousMethod · 0.80
equal_rangeMethod · 0.80
findOverlapFunction · 0.70
OverlapClass · 0.70
VertexClass · 0.70
reverseComplementFunction · 0.50
beginMethod · 0.45
endMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected