| 38 | } |
| 39 | |
| 40 | Sequence |
| 41 | getPathSequence(const ContigPath& path) |
| 42 | { |
| 43 | assert(path.size() >= 1); |
| 44 | Sequence sequence = Sequence(getContigSequence(path[0])); |
| 45 | for (size_t i = 1; i < path.size(); i++) { |
| 46 | const auto& node = path[i]; |
| 47 | const auto distance = distanceBetween(path[i - 1], path[i]); |
| 48 | const auto overlap = -distance; |
| 49 | assert(overlap >= 0); |
| 50 | Sequence newSequence = Sequence(getContigSequence(node)); |
| 51 | assert(int(sequence.size()) >= overlap); |
| 52 | assert(int(newSequence.size()) >= overlap); |
| 53 | assert(sequence.substr(sequence.size() - overlap) == newSequence.substr(0, overlap)); |
| 54 | sequence += newSequence.substr(overlap); |
| 55 | } |
| 56 | return sequence; |
| 57 | } |
| 58 | |
| 59 | Sequence |
| 60 | getPathSequence(const ImaginaryContigPath& path) |
no test coverage detected