+ //check to make sure that is not whole seq
+ if ((rearPos - frontPos - 1) <= 0) {
+ query.setAligned("");
+ //trim topMatches
+ for (int i = 0; i < topMatches.size(); i++) {
+ topMatches[i].setAligned("");
+ }
+
+ }else {
+
+ //trim query
+ string newAligned = query.getAligned();
+ newAligned = newAligned.substr(frontPos, (rearPos-frontPos+1));
+ query.setAligned(newAligned);
+
+ //trim topMatches
+ for (int i = 0; i < topMatches.size(); i++) {
+ newAligned = topMatches[i].getAligned();
+ newAligned = newAligned.substr(frontPos, (rearPos-frontPos+1));
+ topMatches[i].setAligned(newAligned);
+ }
+
+ for (int i = 0; i < newAligned.length(); i++) {
+ trimmedPos[i] = i+frontPos;
+ }