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

Function mergePath

MergePaths/MergeContigs.cpp:294–313  ·  view source on GitHub ↗

Merge the specified path. */

Source from the content-addressed store, hash-verified

292
293/** Merge the specified path. */
294static Contig
295mergePath(const Graph& g, const Contigs& contigs, const ContigPath& path)
296{
297 Sequence seq;
298 unsigned coverage = 0;
299 for (ContigPath::const_iterator it = path.begin(); it != path.end(); ++it) {
300 if (!it->ambiguous())
301 coverage += g[*it].coverage;
302 if (seq.empty()) {
303 seq = sequence(contigs, *it);
304 } else {
305 assert(it != path.begin());
306 mergeContigs(g, contigs, *(it - 1), *it, seq, path);
307 }
308 }
309 ostringstream ss;
310 ss << seq.size() << ' ' << coverage << ' ';
311 pathToComment(ss, g, path);
312 return Contig(ss.str(), seq);
313}
314
315/** A container of ContigPath. */
316typedef vector<ContigPath> ContigPaths;

Callers 1

mainFunction · 0.70

Calls 10

pathToCommentFunction · 0.85
ContigClass · 0.85
ambiguousMethod · 0.80
sequenceFunction · 0.70
mergeContigsFunction · 0.70
beginMethod · 0.45
endMethod · 0.45
emptyMethod · 0.45
sizeMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected