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

Class Overlap

Overlap/Overlap.cpp:212–237  ·  view source on GitHub ↗

An overlap of two sequences. */

Source from the content-addressed store, hash-verified

210
211/** An overlap of two sequences. */
212struct Overlap : public DistanceEst {
213 unsigned overlap;
214 bool mask;
215
216 Overlap() : overlap(UINT_MAX), mask(false) { }
217 Overlap(int) { assert(false); }
218 Overlap(const DistanceEst& est, unsigned overlap, bool mask)
219 : DistanceEst(est), overlap(overlap), mask(mask) { }
220
221 bool operator==(const Overlap& o) const
222 {
223 return overlap == o.overlap;
224 }
225
226 operator Distance() const
227 {
228 assert(overlap > 0);
229 return -overlap;
230 }
231
232 friend ostream& operator<<(ostream& out, const Overlap& o)
233 {
234 return out << "d="
235 << (o.overlap > 0 ? -(int)o.overlap : o.distance);
236 }
237};
238
239/** Create a contig representing the gap between contigs u and v. */
240static FastaRecord createGapContig(const Graph& g,

Callers 1

findOverlapFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected