X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=maligner.cpp;h=b3cb991299fbf29d595318e613f8654cc7f3426f;hb=0d4b21e5ccc56276b0c18d17d8e75d94ce1df4e7;hp=eaaaa8789961d4938a1aba793fb32e7ac331a105;hpb=1e4552ceb0f67f70a147d1cdca7244b62ac115ab;p=mothur.git diff --git a/maligner.cpp b/maligner.cpp index eaaaa87..b3cb991 100644 --- a/maligner.cpp +++ b/maligner.cpp @@ -88,7 +88,8 @@ string Maligner::chimeraMaligner(int chimeraPenalty, DeCalculator* decalc) { vector temp = refSeqs; temp.push_back(query); - + + verticalFilter(temp); vector< vector > matrix = buildScoreMatrix(query->getAligned().length(), refSeqs.size()); //builds and initializes @@ -204,7 +205,7 @@ int Maligner::computeChimeraPenalty() { int numAllowable = ((1.0 - (1.0/minDivR)) * query->getNumBases()); -// if(numAllowable < 2){ numAllowable = 2; } +// if(numAllowable < 1){ numAllowable = 1; } int penalty = int(numAllowable + 1) * misMatchPenalty; @@ -314,7 +315,7 @@ void Maligner::fillScoreMatrix(vector >& ms, vector >& ms, vector Maligner::extractHighestPath(vector > } } -// cout << highestScore << '\t' << highestStruct.size() << endl; +// cout << endl << highestScore << '\t' << highestStruct.size() << '\t' << highestStruct[0].row << endl; vector maxTrace; double maxPercentIdenticalQueryAntiChimera = 0; - int maxIndex = -1; for(int i=0;i Maligner::extractHighestPath(vector > // for(int j=0;jgetName() << endl; // } - -// Need to do something with this in a bit... -// if (trace.size() > 1) { chimera = "yes"; } -// else { chimera = "no"; } - + int traceStart = path[0].col; int traceEnd = path[path.size()-1].col; // cout << "traceStart/End\t" << traceStart << '\t' << traceEnd << endl; @@ -475,10 +472,9 @@ vector Maligner::extractHighestPath(vector > if(percentIdenticalQueryAntiChimera > maxPercentIdenticalQueryAntiChimera){ maxPercentIdenticalQueryAntiChimera = percentIdenticalQueryAntiChimera; maxTrace = trace; - maxIndex = i; } } -// cout << maxPercentIdenticalQueryAntiChimera << '\t' << maxIndex << endl; +// cout << maxPercentIdenticalQueryAntiChimera << endl; return maxTrace; }