MCPcopy Create free account
hub / github.com/BirolLab/abyss / removeExtensionsToSequence

Function removeExtensionsToSequence

Assembly/ErodeAlgorithm.h:29–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27/** Remove all the extensions to this sequence. */
28template <typename Graph>
29void 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. */
49static inline

Callers 2

splitAmbiguousFunction · 0.85

Calls 5

getExtensionMethod · 0.80
shiftMethod · 0.45
checkBaseMethod · 0.45
setLastBaseMethod · 0.45
removeExtensionMethod · 0.45

Tested by

no test coverage detected