| 529 | |
| 530 | template<typename pred> |
| 531 | static void |
| 532 | removeContigs_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. */ |
| 550 | typedef vector<const_string> Contigs; |
no test coverage detected