Trimming driver function */
| 12 | |
| 13 | /** Trimming driver function */ |
| 14 | static inline |
| 15 | void performTrim(SequenceCollectionHash* seqCollection) |
| 16 | { |
| 17 | if (opt::trimLen == 0) |
| 18 | return; |
| 19 | unsigned rounds = 0; |
| 20 | size_t total = 0; |
| 21 | for (unsigned trim = 1; trim < opt::trimLen; trim *= 2) { |
| 22 | rounds++; |
| 23 | total += trimSequences(seqCollection, trim); |
| 24 | } |
| 25 | size_t count; |
| 26 | while ((count = trimSequences(seqCollection, opt::trimLen)) > 0) { |
| 27 | rounds++; |
| 28 | total += count; |
| 29 | } |
| 30 | std::cout << "Pruned " << total << " tips in " |
| 31 | << rounds << " rounds.\n"; |
| 32 | tempCounter[1] += total; |
| 33 | tempCounter[2] = rounds; |
| 34 | } |
| 35 | |
| 36 | /** Prune tips shorter than maxBranchCull. */ |
| 37 | static inline |
no test coverage detected