+ char base = baseFlow[i % baseFlow.length()];
+
+ if (intensity == 0) { //are we in the middle
+ if (oldspot != -1) { charInMiddle.insert(base); }
+ }else if (intensity >= 1) {
+ if (oldspot == -1) { updateOld = true; }
+ else { //check for bases inbetween two 1's
+ if (charInMiddle.count(base) != 0) { //we want to covert to an N
+ sequence = sequence.substr(0, oldspot+1);
+ sequence += 'N';
+ }
+ updateOld = true;
+ charInMiddle.clear();
+ }
+ }