Find every path that overlaps with the specified path. */
| 304 | |
| 305 | /** Find every path that overlaps with the specified path. */ |
| 306 | static void |
| 307 | findOverlaps( |
| 308 | const Graph& g, |
| 309 | const Paths& paths, |
| 310 | const SeedMap& seedMap, |
| 311 | const Vertex& v, |
| 312 | Overlaps& overlaps) |
| 313 | { |
| 314 | ContigPath rc; |
| 315 | if (v.sense) { |
| 316 | rc = paths[v.id]; |
| 317 | reverseComplement(rc.begin(), rc.end()); |
| 318 | } |
| 319 | const ContigPath& path = v.sense ? rc : paths[v.id]; |
| 320 | |
| 321 | for (ContigPath::const_iterator it = path.begin(); it != path.end(); ++it) { |
| 322 | if (it->ambiguous()) |
| 323 | continue; |
| 324 | |
| 325 | pair<SeedMap::const_iterator, SeedMap::const_iterator> range = seedMap.equal_range(*it); |
| 326 | for (SeedMap::const_iterator seed = range.first; seed != range.second; ++seed) { |
| 327 | if (v == seed->second) |
| 328 | continue; |
| 329 | int distance = 0; |
| 330 | unsigned overlap = findOverlap(g, paths, it, path.end(), seed->second, distance); |
| 331 | if (overlap > 0) |
| 332 | overlaps.push_back(Overlap(v, seed->second, overlap, distance)); |
| 333 | } |
| 334 | } |
| 335 | } |
| 336 | |
| 337 | /** Find every pair of overlapping paths. */ |
| 338 | static Overlaps |
no test coverage detected