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

Method shiftAppend

Common/Kmer.cpp:326–337  ·  view source on GitHub ↗

Shift the sequence left and append a new base to the end. * @return the base shifted out */

Source from the content-addressed store, hash-verified

324 * @return the base shifted out
325 */
326uint8_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

Callers 1

isPalindromeMethod · 0.80

Calls 1

seqIndexToBaseIndexFunction · 0.85

Tested by

no test coverage detected