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

Function generateDistFile

ParseAligns/ParseAligns.cpp:261–288  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

259}
260
261static void
262generateDistFile()
263{
264 ofstream distFile(opt::distPath.c_str());
265 assert(distFile.is_open());
266 for (EstimateMap::iterator mapIt = estMap.begin(); mapIt != estMap.end(); ++mapIt) {
267 // Skip empty iterators
268 assert(!mapIt->second.estimates[0].empty() || !mapIt->second.estimates[1].empty());
269 distFile << mapIt->first;
270 for (int refIsRC = 0; refIsRC <= 1; refIsRC++) {
271 if (refIsRC)
272 distFile << " ;";
273
274 for (Estimates::iterator vecIt = mapIt->second.estimates[refIsRC].begin();
275 vecIt != mapIt->second.estimates[refIsRC].end();
276 ++vecIt) {
277 vecIt->second.distance =
278 (int)round((double)vecIt->second.distance / (double)vecIt->second.numPairs);
279 if (vecIt->second.numPairs >= opt::c && vecIt->second.numPairs != 0
280 /*&& vecIt->distance > 1 - opt::k*/)
281 distFile << ' ' << get(g_contigNames, vecIt->first) << ',' << vecIt->second;
282 }
283 }
284 distFile << '\n';
285 assert_good(distFile, opt::distPath);
286 }
287 distFile.close();
288}
289
290static bool
291isSingleEnd(const string& id);

Callers 1

mainFunction · 0.85

Calls 7

assert_goodFunction · 0.85
closeMethod · 0.80
getFunction · 0.50
c_strMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected