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

Function createGapContig

Overlap/Overlap.cpp:240–261  ·  view source on GitHub ↗

Create a contig representing the gap between contigs u and v. */

Source from the content-addressed store, hash-verified

238
239/** Create a contig representing the gap between contigs u and v. */
240static FastaRecord createGapContig(const Graph& g,
241 const ContigNode& u, const ContigNode& v,
242 const Overlap& o)
243{
244 assert(opt::scaffold);
245 assert(o.overlap == 0);
246 stats.scaffold++;
247 int distance = o.distance;
248 if (opt::verbose > 0)
249 cout << get(vertex_name, g, u)
250 << '\t' << get(vertex_name, g, v)
251 << "\t(" << distance << ")\n";
252 assert(distance < 100000);
253 string gap = distance <= 0 ? string("n")
254 : string(distance, 'N');
255 const string& useq = sequence(u);
256 const string& vseq = sequence(v);
257 unsigned overlap = opt::k - 1; // by convention
258 return newContig(g, u, v, distance,
259 useq.substr(useq.length() - overlap) + gap
260 + vseq.substr(0, overlap));
261}
262
263/** The scaffold graph. Edges join two blunt contigs that are joined
264 * by a distance estimate. */

Callers 1

mainFunction · 0.85

Calls 4

newContigFunction · 0.85
sequenceFunction · 0.70
getFunction · 0.50
lengthMethod · 0.45

Tested by

no test coverage detected