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

Function assemblePathGraph

MergePaths/MergePaths.cpp:764–796  ·  view source on GitHub ↗

Assemble the path overlap graph. */

Source from the content-addressed store, hash-verified

762
763/** Assemble the path overlap graph. */
764static void
765assemblePathGraph(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. */
799static ContigPathMap

Callers 1

mainFunction · 0.85

Calls 11

assembleDFSFunction · 0.85
mergeSeedPathsFunction · 0.85
findFunction · 0.85
removeSubsumedPathsFunction · 0.85
outputSortedPathsFunction · 0.85
contigIndexMethod · 0.80
senseMethod · 0.80
removeRepeatsFunction · 0.70
reverseComplementFunction · 0.50
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected