Perform a single round of trimming at the specified length. */
| 346 | |
| 347 | /** Perform a single round of trimming at the specified length. */ |
| 348 | size_t NetworkSequenceCollection::controlTrimRound(unsigned trimLen) |
| 349 | { |
| 350 | assert(trimLen > 0); |
| 351 | m_trimStep = trimLen; |
| 352 | cout << "Pruning tips shorter than " << trimLen << " bp...\n"; |
| 353 | SetState(NAS_TRIM); |
| 354 | m_comm.sendControlMessage(APC_TRIM, trimLen); |
| 355 | m_comm.barrier(); |
| 356 | size_t numRemoved = performNetworkTrim(); |
| 357 | EndState(); |
| 358 | |
| 359 | m_numReachedCheckpoint++; |
| 360 | while (!checkpointReached()) |
| 361 | pumpNetwork(); |
| 362 | numRemoved += m_checkpointSum; |
| 363 | |
| 364 | size_t numSweeped = controlRemoveMarked(); |
| 365 | |
| 366 | if (numRemoved > 0) |
| 367 | cout << "Pruned " << numSweeped << " k-mer in " |
| 368 | << numRemoved << " tips.\n"; |
| 369 | return numRemoved; |
| 370 | } |
| 371 | |
| 372 | /** Perform multiple rounds of trimming until complete. */ |
| 373 | void NetworkSequenceCollection::controlTrim(unsigned& sum, unsigned start) |
nothing calls this directly
no test coverage detected