Find the overlaps between paths and add edges to the graph. */
| 323 | |
| 324 | /** Find the overlaps between paths and add edges to the graph. */ |
| 325 | static void |
| 326 | findPathOverlaps( |
| 327 | const Lengths& lengths, |
| 328 | const ContigPathMap& paths, |
| 329 | const ContigNode& seed1, |
| 330 | const ContigPath& path1, |
| 331 | PathGraph& gout) |
| 332 | { |
| 333 | for (ContigPath::const_iterator it = path1.begin(); it != path1.end(); ++it) { |
| 334 | ContigNode seed2 = *it; |
| 335 | if (seed1 == seed2) |
| 336 | continue; |
| 337 | if (seed2.ambiguous()) |
| 338 | continue; |
| 339 | ContigPathMap::const_iterator path2It = paths.find(seed2.contigIndex()); |
| 340 | if (path2It == paths.end()) |
| 341 | continue; |
| 342 | |
| 343 | ContigPath path2 = path2It->second; |
| 344 | if (seed2.sense()) |
| 345 | reverseComplement(path2.begin(), path2.end()); |
| 346 | addOverlapEdge(lengths, gout, seed2, seed1, path1, seed2, path2); |
| 347 | } |
| 348 | } |
| 349 | |
| 350 | /** Attempt to merge the paths specified in mergeQ with path. |
| 351 | * @return the number of paths merged |
no test coverage detected