| 506 | }; |
| 507 | |
| 508 | static void |
| 509 | removeShims(Graph& g, const vector<bool>& seen) |
| 510 | { |
| 511 | if (opt::verbose > 0) |
| 512 | cerr << "Removing shim contigs from the graph...\n"; |
| 513 | vector<vertex_descriptor> shortContigs; |
| 514 | findShortContigs(g, seen, shortContigs); |
| 515 | for (unsigned i = 0; !shortContigs.empty(); ++i) { |
| 516 | if (opt::verbose > 0) |
| 517 | cerr << "Pass " << i + 1 << ": Checking " << shortContigs.size() << " contigs.\n"; |
| 518 | sort(shortContigs.begin(), shortContigs.end(), sortContigs(g)); |
| 519 | removeContigs(g, shortContigs); |
| 520 | } |
| 521 | if (opt::verbose > 0) { |
| 522 | cerr << "Shim removal stats:\n"; |
| 523 | cerr << "Removed: " << g_count.removed / 2 << " Too Complex: " << g_count.too_complex / 2 |
| 524 | << " Tails: " << g_count.tails / 2 << " Too Long: " << g_count.too_long / 2 |
| 525 | << " Self Adjacent: " << g_count.self_adj / 2 |
| 526 | << " Parallel Edges: " << g_count.parallel_edge / 2 << '\n'; |
| 527 | } |
| 528 | } |
| 529 | |
| 530 | template<typename pred> |
| 531 | static void |
no test coverage detected