Returns the most likely base found by the pile up count. */
| 269 | |
| 270 | /** Returns the most likely base found by the pile up count. */ |
| 271 | static char selectBase(const BaseCount& count, unsigned& sumBest, |
| 272 | unsigned& sumSecond) |
| 273 | { |
| 274 | int bestBase = -1; |
| 275 | unsigned bestCount = 0; |
| 276 | unsigned secondCount = 0; |
| 277 | for (int x = 0; x < 4; x++) { |
| 278 | if (count.count[x] > bestCount) { |
| 279 | bestBase = x; |
| 280 | secondCount = bestCount; |
| 281 | bestCount = count.count[x]; |
| 282 | } |
| 283 | } |
| 284 | |
| 285 | sumBest += bestCount; |
| 286 | sumSecond += secondCount; |
| 287 | |
| 288 | if (bestBase == -1) |
| 289 | return 'N'; |
| 290 | return codeToBase(bestBase); |
| 291 | } |
| 292 | |
| 293 | /** Convert all 'N' bases to nt's based on local information. */ |
| 294 | static void fixUnknown(Sequence& ntSeq, const Sequence& csSeq ) |
no test coverage detected