| 1292 | */ |
| 1293 | template<class iterator, class oiterator> |
| 1294 | static bool |
| 1295 | alignAmbiguous( |
| 1296 | const Lengths& lengths, |
| 1297 | iterator& it1, |
| 1298 | iterator last1, |
| 1299 | iterator& it2, |
| 1300 | iterator last2, |
| 1301 | oiterator& out) |
| 1302 | { |
| 1303 | assert(it1 != last1); |
| 1304 | assert(it1->ambiguous()); |
| 1305 | assert(it1 + 1 != last1); |
| 1306 | assert(it2 != last2); |
| 1307 | |
| 1308 | // Find a seed for the alignment. |
| 1309 | for (iterator it1e = it1; it1e != last1; ++it1e) { |
| 1310 | if (it1e->ambiguous()) |
| 1311 | continue; |
| 1312 | if (alignAtSeed(lengths, it1, it1e, last1, it2, last2, out)) |
| 1313 | return true; |
| 1314 | } |
| 1315 | |
| 1316 | // No valid seeded alignment. Check whether path2 fits entirely |
| 1317 | // within the gap of path1. |
| 1318 | return alignCoordinates(lengths, it1, last1, it2, last2, out); |
| 1319 | } |
| 1320 | |
| 1321 | /** Align the next pair of contigs. |
| 1322 | * The end of the alignment is returned in it1 and it2. |
no test coverage detected