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

Function resolveShort

RResolver/RAlgorithmsShort.cpp:1259–1323  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1257}
1258
1259void
1260resolveShort(
1261 const std::vector<std::string>& readFilepaths,
1262 ImaginaryContigPaths& supportedPaths,
1263 ImaginaryContigPaths& unsupportedPaths)
1264{
1265 if (!determineShortReadStats(readFilepaths)) {
1266 return;
1267 }
1268
1269 if (opt::verbose) {
1270 std::cerr << "\nRunning resolution algorithm...\n";
1271 }
1272
1273 assert(g_contigSequences.size() > 0);
1274 assert(g_contigSequences.size() / 2 == g_contigComments.size());
1275 assert(ReadSize::readSizes.size() > 0);
1276
1277 std::vector<std::pair<int, Histogram>> histograms;
1278 for (auto batch : ReadSize::readSizes) {
1279 ReadSize::current = batch;
1280
1281 for (int r : ReadSize::current.rValues) {
1282 if (int(r) < int(opt::k)) {
1283 std::cerr << "r value " << r << "(" << ReadSize::current.size
1284 << ") is too short - skipping." << std::endl;
1285 continue;
1286 }
1287
1288 if (opt::verbose) {
1289 std::cerr << "\nRead size = " << batch.size << ", r = " << r << " ...\n\n";
1290 }
1291
1292 buildFilters(readFilepaths, r, opt::bfMemFactor * double(opt::bloomSize));
1293
1294 for (size_t j = 0; j < MAX_SUBITERATIONS; j++) {
1295 if (opt::verbose) {
1296 std::cerr << "\nSubiteration " << j + 1 << "...\n";
1297 }
1298
1299 int unsupportedCountPrev = unsupportedPaths.size();
1300
1301 Resolution resolution = resolveRepeats();
1302
1303 if (!resolution.failed) {
1304 processGraph(resolution, supportedPaths, unsupportedPaths);
1305 assembleContigs();
1306 if (!opt::histPrefix.empty()) {
1307 writeHistograms(resolution, opt::histPrefix, j);
1308 }
1309 }
1310
1311 int newUnsupportedCount = unsupportedPaths.size() - unsupportedCountPrev;
1312 assert(newUnsupportedCount >= 0);
1313 if (newUnsupportedCount == 0) {
1314 break;
1315 }
1316 }

Callers 1

mainFunction · 0.85

Calls 7

buildFiltersFunction · 0.85
resolveRepeatsFunction · 0.85
processGraphFunction · 0.85
assembleContigsFunction · 0.85
writeHistogramsFunction · 0.85
sizeMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected