]> git.donarmstrong.com Git - mothur.git/blobdiff - sequence.cpp
added keep dots to pcr.seqs. fixed pre.cluster name file name when group option is...
[mothur.git] / sequence.cpp
index cfd8ec21498120614b94d3adbdade7275eb6a8b7..9cdbfb91cf6ba148dbf4e2f5b4252b33604c906c 100644 (file)
@@ -581,6 +581,11 @@ int Sequence::filterToPos(int start){
                aligned[j] = '.';
        }
        
+    //things like ......----------AT become ................AT
+    for(int j = start-1; j < aligned.length(); j++) {
+        if (isalpha(aligned[j])) { break; }
+        else { aligned[j] = '.'; }
+    }
     setUnaligned(aligned);
     
     return 0;
@@ -596,6 +601,11 @@ int Sequence::filterFromPos(int end){
                aligned[j] = '.';
        }
        
+    for(int j = aligned.length()-1; j < 0; j--) {
+        if (isalpha(aligned[j])) { break; }
+        else { aligned[j] = '.'; }
+    }
+    
     setUnaligned(aligned);
     
     return 0;