X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=nast.cpp;h=90c8383f2a8a6fb23467d6b662879dfde5fd8f49;hb=0b99c6b6ea875e13febda76903fd4d9cda7add7d;hp=8ed69fa6820cca9003dd8af1a0cb148c85899753;hpb=202846c98b9eff0eca7b20a570bfffa8ee4a5f4e;p=mothur.git diff --git a/nast.cpp b/nast.cpp index 8ed69fa..90c8383 100644 --- a/nast.cpp +++ b/nast.cpp @@ -99,7 +99,7 @@ void Nast::removeExtraGaps(string& candAln, string tempAln, string newTemplateAl for(int i=0; i move stuff left there's if(leftRoom >= insertLength){ // enough room to the left to move - //cout << "lr newTemplateAlign = " << newTemplateAlign.length() << '\t' << i << '\t' << i+insertLength << endl; + //cout << "lr newTemplateAlign = " << newTemplateAlign.length() << '\t' << i << '\t' << insertLength << endl; string leftTemplateString = newTemplateAlign.substr(0,i); string rightTemplateString = newTemplateAlign.substr((i+insertLength)); newTemplateAlign = leftTemplateString + rightTemplateString; longAlignmentLength = newTemplateAlign.length(); - //cout << "lr candAln = " << candAln.length() << '\t' << leftIndex-insertLength+1 << '\t' << leftIndex+1 << endl; + //cout << "lr candAln = " << candAln.length() << '\t' << leftIndex << '\t' << endl; string leftCandidateString = candAln.substr(0,(leftIndex-insertLength+1)); string rightCandidateString = candAln.substr((leftIndex+1)); candAln = leftCandidateString + rightCandidateString; @@ -145,12 +145,12 @@ void Nast::removeExtraGaps(string& candAln, string tempAln, string newTemplateAl } else{ // not enough room to the left, have to steal some space to - //cout << "in else lr newTemplateAlign = " << newTemplateAlign.length() << '\t' << i << '\t' << i+insertLength << endl; + //cout << "in else lr newTemplateAlign = " << newTemplateAlign.length() << '\t' << i << '\t' << insertLength << endl; string leftTemplateString = newTemplateAlign.substr(0,i); // the right string rightTemplateString = newTemplateAlign.substr((i+insertLength)); newTemplateAlign = leftTemplateString + rightTemplateString; longAlignmentLength = newTemplateAlign.length(); - //cout << " in else lr candAln = " << candAln.length() << '\t' << leftIndex-leftRoom+1 << '\t' << rightIndex-leftIndex-1 << '\t' << rightIndex+(insertLength-leftRoom) << endl; + //cout << " in else lr candAln = " << candAln.length() << '\t' << " leftIndex = " << leftIndex << " leftroom = " << leftRoom << " rightIndex = " << rightIndex << '\t' << endl; string leftCandidateString = candAln.substr(0,(leftIndex-leftRoom+1)); string insertString = candAln.substr((leftIndex+1),(rightIndex-leftIndex-1)); string rightCandidateString = candAln.substr((rightIndex+(insertLength-leftRoom))); @@ -187,6 +187,7 @@ void Nast::removeExtraGaps(string& candAln, string tempAln, string newTemplateAl } } i -= insertLength; + //if (i < 0) { cout << " we have a negative i = " << i << endl; } } else{