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

Function extendBranch

Assembly/TrimAlgorithm.h:102–124  ·  view source on GitHub ↗

Extend this branch. */

Source from the content-addressed store, hash-verified

100
101/** Extend this branch. */
102static inline
103bool extendBranch(BranchRecord& branch,
104 graph_traits<SequenceCollectionHash>::vertex_descriptor& kmer,
105 SequenceCollectionHash::SymbolSet ext)
106{
107 typedef SequenceCollectionHash Graph;
108 typedef graph_traits<Graph>::vertex_descriptor V;
109
110 if (!ext.hasExtension()) {
111 branch.terminate(BS_NOEXT);
112 return false;
113 } else if (ext.isAmbiguous()) {
114 branch.terminate(BS_AMBI_SAME);
115 return false;
116 } else {
117 std::vector<V> adj;
118 generateSequencesFromExtension(kmer, branch.getDirection(),
119 ext, adj);
120 assert(adj.size() == 1);
121 kmer = adj.front();
122 return true;
123 }
124}
125
126/**
127 * Process the extension for this branch for the trimming algorithm

Callers 3

assembleFunction · 0.85

Calls 7

terminateMethod · 0.80
hasExtensionMethod · 0.45
isAmbiguousMethod · 0.45
getDirectionMethod · 0.45
sizeMethod · 0.45
frontMethod · 0.45

Tested by

no test coverage detected