//moved this into driver to avoid deep copies in windows paralellized version
Alignment* alignment;
int longestBase = templateDB->getLongestBase();
//moved this into driver to avoid deep copies in windows paralellized version
Alignment* alignment;
int longestBase = templateDB->getLongestBase();
if(align == "gotoh") { alignment = new GotohOverlap(gapOpen, gapExtend, match, misMatch, longestBase); }
else if(align == "needleman") { alignment = new NeedlemanOverlap(gapOpen, match, misMatch, longestBase); }
else if(align == "blast") { alignment = new BlastAlignment(gapOpen, gapExtend, match, misMatch); }
if(align == "gotoh") { alignment = new GotohOverlap(gapOpen, gapExtend, match, misMatch, longestBase); }
else if(align == "needleman") { alignment = new NeedlemanOverlap(gapOpen, match, misMatch, longestBase); }
else if(align == "blast") { alignment = new BlastAlignment(gapOpen, gapExtend, match, misMatch); }
int numBasesNeeded = origNumBases * threshold;
if (candidateSeq->getName() != "") { //incase there is a commented sequence at the end of a file
int numBasesNeeded = origNumBases * threshold;
if (candidateSeq->getName() != "") { //incase there is a commented sequence at the end of a file
- if (candidateSeq->getUnaligned().length() > alignment->getnRows()) {
- alignment->resize(candidateSeq->getUnaligned().length()+1);
+ if (candidateSeq->getUnaligned().length()+1 > alignment->getnRows()) {
+ if (m->debug) { m->mothurOut("[DEBUG]: " + candidateSeq->getName() + " " + toString(candidateSeq->getUnaligned().length()) + " " + toString(alignment->getnRows()) + " \n"); }
+ alignment->resize(candidateSeq->getUnaligned().length()+2);
//get reverse compliment
copy = new Sequence(candidateSeq->getName(), originalUnaligned);
copy->reverseComplement();
//get reverse compliment
copy = new Sequence(candidateSeq->getName(), originalUnaligned);
copy->reverseComplement();
searchScore = templateDB->getSearchScore();
nast2 = new Nast(alignment, copy, templateSeq2);
searchScore = templateDB->getSearchScore();
nast2 = new Nast(alignment, copy, templateSeq2);
//check if any better
if (copy->getNumBases() > candidateSeq->getNumBases()) {
candidateSeq->setAligned(copy->getAligned()); //use reverse compliments alignment since its better
//check if any better
if (copy->getNumBases() > candidateSeq->getNumBases()) {
candidateSeq->setAligned(copy->getAligned()); //use reverse compliments alignment since its better
//check if any better
if (copy->getNumBases() > candidateSeq->getNumBases()) {
candidateSeq->setAligned(copy->getAligned()); //use reverse compliments alignment since its better
//check if any better
if (copy->getNumBases() > candidateSeq->getNumBases()) {
candidateSeq->setAligned(copy->getAligned()); //use reverse compliments alignment since its better
- num = driver(lines[process], alignFileName + toString(getpid()) + ".temp", reportFileName + toString(getpid()) + ".temp", accnosFName + toString(getpid()) + ".temp", filename);
+ num = driver(lines[process], alignFileName + toString(m->mothurGetpid(process)) + ".temp", reportFileName + toString(m->mothurGetpid(process)) + ".temp", accnosFName + m->mothurGetpid(process) + ".temp", filename);