| 27 | /** Remove all the extensions to this sequence. */ |
| 28 | template <typename Graph> |
| 29 | void removeExtensionsToSequence(Graph* seqCollection, |
| 30 | const typename Graph::value_type& seq, extDirection dir) |
| 31 | { |
| 32 | typedef typename graph_traits<Graph>::vertex_descriptor V; |
| 33 | typedef typename Graph::Symbol Symbol; |
| 34 | typedef typename Graph::SymbolSet SymbolSet; |
| 35 | |
| 36 | SymbolSet extension(seq.second.getExtension(dir)); |
| 37 | V testSeq(seq.first); |
| 38 | Symbol extBase = testSeq.shift(dir); |
| 39 | for (unsigned i = 0; i < extension.NUM; ++i) { |
| 40 | Symbol x(i); |
| 41 | if (extension.checkBase(x)) { |
| 42 | testSeq.setLastBase(dir, x); |
| 43 | seqCollection->removeExtension(testSeq, !dir, extBase); |
| 44 | } |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | /** Return the number of k-mer that have been eroded. */ |
| 49 | static inline |
no test coverage detected