Remove paths subsumed by the specified path. * @param seed [out] the ID of the subsuming path * @param overlaps [out] paths that are found to overlap * @return the next iterator after path1it */
| 586 | * @return the next iterator after path1it |
| 587 | */ |
| 588 | static ContigPathMap::const_iterator |
| 589 | removeSubsumedPaths( |
| 590 | const Lengths& lengths, |
| 591 | ContigPathMap::const_iterator path1It, |
| 592 | ContigPathMap& paths, |
| 593 | ContigID& seed, |
| 594 | set<ContigID>& overlaps) |
| 595 | { |
| 596 | if (gDebugPrint) |
| 597 | cout << '\n'; |
| 598 | set<ContigID> eq; |
| 599 | seed = identifySubsumedPaths(lengths, path1It, paths, eq, overlaps); |
| 600 | ++path1It; |
| 601 | for (set<ContigID>::const_iterator it = eq.begin(); it != eq.end(); ++it) { |
| 602 | if (*it == path1It->first) |
| 603 | ++path1It; |
| 604 | paths.erase(*it); |
| 605 | } |
| 606 | return path1It; |
| 607 | } |
| 608 | |
| 609 | /** Remove paths subsumed by another path. |
| 610 | * @return paths that are found to overlap |