Return a pivot suitable for aligning the two paths if one exists, * otherwise return false. */
| 1455 | * otherwise return false. |
| 1456 | */ |
| 1457 | static pair<ContigNode, bool> |
| 1458 | findPivot(const ContigPath& path1, const ContigPath& path2) |
| 1459 | { |
| 1460 | for (ContigPath::const_iterator it = path2.begin(); it != path2.end(); ++it) { |
| 1461 | if (it->ambiguous()) |
| 1462 | continue; |
| 1463 | if (count(path2.begin(), path2.end(), *it) == 1 && |
| 1464 | count(path1.begin(), path1.end(), *it) == 1) |
| 1465 | return make_pair(*it, true); |
| 1466 | } |
| 1467 | return make_pair(ContigNode(0), false); |
| 1468 | } |
| 1469 | |
| 1470 | /** Find an equivalent region of the two specified paths. |
| 1471 | * @param[out] orientation the orientation of the alignment |
no test coverage detected