X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=readblast.cpp;h=4833d0125d8a286e0116be5ae0644c33f5443803;hb=3102812d94898439646131cecdb64fc542913c87;hp=9979a7586f59f3827f96645439b1ae323ed8a733;hpb=762b3e4c83e1e8e8392c1199b6482d36ee89e50f;p=mothur.git diff --git a/readblast.cpp b/readblast.cpp index 9979a75..4833d01 100644 --- a/readblast.cpp +++ b/readblast.cpp @@ -169,6 +169,7 @@ int ReadBlast::read(NameAssignment* nameMap) { map::iterator itDist; for(it=thisRowsBlastScores.begin(); it!=thisRowsBlastScores.end(); it++) { distance = 1.0 - (it->second / refScore); + //do we already have the distance calculated for b->a map::iterator itA = nameMap->find(currentRow); @@ -176,10 +177,12 @@ int ReadBlast::read(NameAssignment* nameMap) { //if we have it then compare if (itDist != dists[it->first].end()) { + if (distance < 0.0) { cout << currentRow << '\t' << nameMap->get(it->first) << '\t' << "score = " << it->second << " refscore = " << refScore << " distance = " << distance << " distance = " << itDist->second << endl; } + //if you want the minimum blast score ratio, then pick max distance if(minWanted) { distance = max(itDist->second, distance); } else{ distance = min(itDist->second, distance); } - + //is this distance below cutoff if (distance < cutoff) { if (!hclusterWanted) {