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

Function removeContigs_if

FilterGraph/FilterGraph.cc:531–547  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

529
530template<typename pred>
531static void
532removeContigs_if(Graph& g, pred p)
533{
534 typedef graph_traits<Graph> GTraits;
535 typedef GTraits::vertex_iterator Vit;
536 typedef GTraits::vertex_descriptor V;
537 Vit first, second;
538 tie(first, second) = vertices(g);
539 vector<V> sc;
540 ::copy_if(first, second, back_inserter(sc), p);
541 remove_vertex_if(g, sc.begin(), sc.end(), True<V>());
542 transform(sc.begin(), sc.end(), back_inserter(g_removed), [](const ContigNode& c) {
543 return c.contigIndex();
544 });
545 if (opt::verbose > 0)
546 cerr << "Removed " << sc.size() / 2 << " contigs.\n";
547}
548
549/** Contig sequences. */
550typedef vector<const_string> Contigs;

Callers 1

mainFunction · 0.85

Calls 7

copy_ifFunction · 0.85
remove_vertex_ifFunction · 0.85
contigIndexMethod · 0.80
verticesFunction · 0.50
beginMethod · 0.45
endMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected