]> git.donarmstrong.com Git - mothur.git/blobdiff - readblast.cpp
pat's updates on 7/19/10
[mothur.git] / readblast.cpp
index 9979a7586f59f3827f96645439b1ae323ed8a733..c3dfd4884f0d01d6c9dbb98c17aa9a8341a44c5d 100644 (file)
@@ -169,6 +169,7 @@ int ReadBlast::read(NameAssignment* nameMap) {
                                        map<int, float>::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<string,int>::iterator itA = nameMap->find(currentRow);
@@ -176,10 +177,11 @@ int ReadBlast::read(NameAssignment* nameMap) {
                                                
                                                //if we have it then compare
                                                if (itDist != dists[it->first].end()) {
+       
                                                        //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) {
@@ -311,8 +313,8 @@ int ReadBlast::readNames(NameAssignment* nameMap) {
                ifstream in;
                openInputFile(blastfile, in);
                
-               ofstream outName;
-               openOutputFile("tempOutNames", outName);
+               //ofstream outName;
+               //openOutputFile((blastfile + ".tempOutNames"), outName);
                
                //read first line
                in >> prevName;
@@ -348,6 +350,7 @@ int ReadBlast::readNames(NameAssignment* nameMap) {
                //openOutputFile(outNames, out);
                //nameMap->print(out);
                //out.close();
+               
                if (m->control_pressed) { return 0; }
                
                m->mothurOut(toString(num) + " names read."); m->mothurOutEndLine();