Assemble the path overlap graph. */
| 762 | |
| 763 | /** Assemble the path overlap graph. */ |
| 764 | static void |
| 765 | assemblePathGraph(const Lengths& lengths, PathGraph& pathGraph, ContigPathMap& paths) |
| 766 | { |
| 767 | ContigPaths seedPaths; |
| 768 | assembleDFS(pathGraph, back_inserter(seedPaths)); |
| 769 | ContigPaths mergedPaths = mergeSeedPaths(lengths, paths, seedPaths); |
| 770 | if (opt::verbose > 1) |
| 771 | cout << '\n'; |
| 772 | |
| 773 | // Replace each path with the merged path. |
| 774 | for (ContigPaths::const_iterator it1 = seedPaths.begin(); it1 != seedPaths.end(); ++it1) { |
| 775 | const ContigPath& path(mergedPaths[it1 - seedPaths.begin()]); |
| 776 | ContigPath pathrc(path); |
| 777 | reverseComplement(pathrc.begin(), pathrc.end()); |
| 778 | for (ContigPath::const_iterator it2 = it1->begin(); it2 != it1->end(); ++it2) { |
| 779 | ContigNode seed(*it2); |
| 780 | if (find(path.begin(), path.end(), seed) != path.end()) { |
| 781 | paths[seed.contigIndex()] = seed.sense() ? pathrc : path; |
| 782 | } else { |
| 783 | // This seed was not included in the merged path. |
| 784 | } |
| 785 | } |
| 786 | } |
| 787 | |
| 788 | removeRepeats(paths); |
| 789 | |
| 790 | // Remove the subsumed paths. |
| 791 | if (opt::verbose > 0) |
| 792 | cout << "Removing redundant contigs\n"; |
| 793 | removeSubsumedPaths(lengths, paths); |
| 794 | |
| 795 | outputSortedPaths(lengths, paths); |
| 796 | } |
| 797 | |
| 798 | /** Read a set of paths from the specified file. */ |
| 799 | static ContigPathMap |
no test coverage detected