+ if (stopSpot == 0) { temp = ""; }
+ else { temp = temp.substr(0, stopSpot); }
+
+ }else { temp = ""; } //sequence too short
+
+ }else { //you are keeping the back
+ int tempLength = tempUnaligned.length();
+ if (tempLength > numbases) { //you have enough bases to remove some
+
+ int stopSpot = 0;
+ int numBasesCounted = 0;
+
+ for (int i = (temp.length()-1); i >= 0; i--) {
+ //eliminate N's
+ if (toupper(temp[i]) == 'N') {
+ temp[i] == '.';
+ tempLength--;
+ if (tempLength < numbases) { stopSpot = 0; break; }
+ }
+
+ if(isalpha(temp[i])) { numBasesCounted++; }