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

Function removeContigs

FilterGraph/FilterGraph.cc:349–382  ·  view source on GitHub ↗

Remove the specified contig from the adjacency graph. */

Source from the content-addressed store, hash-verified

347
348/** Remove the specified contig from the adjacency graph. */
349static void
350removeContigs(Graph& g, vector<vertex_descriptor>& sc)
351{
352 typedef graph_traits<Graph> GTraits;
353 typedef GTraits::vertex_descriptor V;
354
355 vector<vertex_descriptor> out;
356 out.reserve(sc.size());
357
358 vector<bool> markedContigs(g.num_vertices());
359 for (vector<vertex_descriptor>::iterator it = sc.begin(); it != sc.end(); ++it) {
360 V v = *it;
361 if (opt::verbose > 0 && ++g_count.checked % 10000000 == 0)
362 cerr << "Removed " << g_count.removed << "/" << g_count.checked
363 << " vertices that have been checked.\n";
364
365 if (markedContigs[get(vertex_index, g, v)]) {
366 out.push_back(v);
367 continue;
368 }
369
370 if (!removable(&g, v))
371 continue;
372
373 vector<EdgeInfo> eds;
374 if (findNewEdges(g, v, eds, markedContigs))
375 addNewEdges(g, eds);
376 else
377 continue;
378
379 removeContig(v, g);
380 }
381 sc.swap(out);
382}
383
384/** Return the value of the bit at the specified index. */
385struct Marked

Callers 1

removeShimsFunction · 0.70

Calls 11

removableFunction · 0.85
findNewEdgesFunction · 0.85
addNewEdgesFunction · 0.85
removeContigFunction · 0.70
getFunction · 0.50
sizeMethod · 0.45
num_verticesMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
push_backMethod · 0.45
swapMethod · 0.45

Tested by

no test coverage detected