char U2AssemblyReadIterator::nextLetter() { assert(hasNext()); skip(); SAFE_POINT(offsetInCigar < cigar.size(), "CIGAR out of range", 0); if(offsetInToken != cigar.at(offsetInCigar).count) { //staying in the current token offsetInToken++; } else { //current token is finished advanceToNextToken(); offsetInToken = 1; } bool del = isDeletion(); char c = del ? '-' : read.at(offsetInRead); //TODO: hardcoded '-' offsetInRead += !del; //adjust offsetInRead only when going through match token return c; }
String TextDiff::Change::appliedTo (const String& text) const noexcept { return text.substring (0, start) + (isDeletion() ? text.substring (start + length) : (insertedText + text.substring (start))); }
void U2AssemblyReadIterator::skip() { while(hasNext() && !isMatch() && !isDeletion()) { skipInsertion(); skipPaddingAndHardClip(); } }