]> git.donarmstrong.com Git - mothur.git/commitdiff
added diffs to trim.seqs
authorwestcott <westcott>
Fri, 7 May 2010 15:00:59 +0000 (15:00 +0000)
committerwestcott <westcott>
Fri, 7 May 2010 15:00:59 +0000 (15:00 +0000)
trimseqscommand.cpp

index 537992584660b29696b602f09285aff6279aea73..06bd0eda506882346f98bd834edcfb74e7f149b9 100644 (file)
@@ -636,11 +636,10 @@ bool TrimSeqsCommand::stripBarcode(Sequence& seq, int& group){
                                alignment->align(oligo, rawSequence.substr(0,length+diffs));
                                oligo = alignment->getSeqAAln();
                                string temp = alignment->getSeqBAln();
-               cout << "barcode = " << oligo << " raw = " << rawSequence.substr(0,oligo.length()) << " raw aligned = " << temp << endl;                        
+               //cout << "barcode = " << oligo << " raw = " << rawSequence.substr(0,oligo.length()) << " raw aligned = " << temp << endl;                      
                                
                                int newStart=0;
-                               if(compareDNASeq(oligo, rawSequence.substr(0,oligo.length()), length, newStart)){
-               cout << "found match" << endl;
+                               if(compareDNASeq(oligo, temp, length, newStart)){
                                        group = it->second;
                                        seq.setUnaligned(rawSequence.substr(newStart));
                                        success = 1;
@@ -705,9 +704,10 @@ bool TrimSeqsCommand::stripForward(Sequence& seq){
                                //use needleman to align first primer.length()+numdiffs of sequence to each primer
                                alignment->align(oligo, rawSequence.substr(0,length+diffs));
                                oligo = alignment->getSeqAAln();
+                               string temp = alignment->getSeqBAln();
                                
                                int newStart = 0;
-                               if(compareDNASeq(oligo, rawSequence.substr(0,oligo.length()), length, newStart)){
+                               if(compareDNASeq(oligo, temp, length, newStart)){
                                        seq.setUnaligned(rawSequence.substr(newStart));
                                        success = 1;
                                        break;