try {
m = MothurOut::getInstance();
maxInsertLength = 0;
+
pairwiseAlignSeqs(); // This is part A in Fig. 2 of DeSantis et al.
regapSequences(); // This is parts B-F in Fig. 2 of DeSantis et al.
+
}
catch(exception& e) {
m->errorOut(e, "Nast", "Nast");
}
}
i -= insertLength;
- //if (i < 0) { cout << " we have a negative i = " << i << endl; }
}
else{
}
// i -= insertLength;
+
+ //if i is negative, we want to remove the extra gaps to the right
+ if (i < 0) { cout << "i is negative" << endl; }
}
}
}
void Nast::regapSequences(){ //This is essentially part B in Fig 2. of DeSantis et al.
try {
-
+ //cout << candidateSeq->getName() << endl;
string candPair = candidateSeq->getPairwise();
string candAln = "";
string lastLoop = "";
while(pairwiseAlignIndex<pairwiseLength){
+ //cout << pairwiseAlignIndex << '\t' << fullAlignIndex << '\t' << pairwiseLength << endl;
if(isalpha(tempPair[pairwiseAlignIndex]) && isalpha(tempAln[fullAlignIndex])
&& isalpha(candPair[pairwiseAlignIndex])){
// the template and candidate pairwise and template aligned have characters
} // 2 of Desantis et al.
candidateSeq->setAligned(candAln);
+ //cout << "here" << endl;
}
catch(exception& e) {
m->errorOut(e, "Nast", "regapSequences");