Shift the sequence left and append a new base to the end. * @return the base shifted out */
| 324 | * @return the base shifted out |
| 325 | */ |
| 326 | uint8_t Kmer::shiftAppend(uint8_t base) |
| 327 | { |
| 328 | unsigned numBytes = bytes(); |
| 329 | uint8_t shiftIn = base; |
| 330 | for(int i = numBytes - 1; i >= 0; i--) |
| 331 | { |
| 332 | unsigned index = (unsigned)i == numBytes - 1 |
| 333 | ? seqIndexToBaseIndex(s_length - 1) : 3; |
| 334 | shiftIn = leftShiftByte(m_seq, i, index, shiftIn); |
| 335 | } |
| 336 | return shiftIn; |
| 337 | } |
| 338 | |
| 339 | /** Shift the sequence right and prepend a new base at the front. |
| 340 | * @return the base shifted out |
no test coverage detected