Create a contig representing the gap between contigs u and v. */
| 238 | |
| 239 | /** Create a contig representing the gap between contigs u and v. */ |
| 240 | static 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. */ |