]> git.donarmstrong.com Git - mothur.git/blobdiff - formatcolumn.cpp
added warning about average neighbor merges around cutoff. fixed little bugs.
[mothur.git] / formatcolumn.cpp
index e68d85d71c32df15ca56cbee916c6c9dd1072df1..a11601b74004d2429b985a1aa1e6fe4114457855 100644 (file)
@@ -47,9 +47,8 @@ void FormatColumnMatrix::read(NameAssignment* nameMap){
                        if(itB == nameMap->end()){      cerr << "ABError: Sequence '" << secondName << "' was not found in the names file, please correct\n"; exit(1);  }
 
                        if (distance == -1) { distance = 1000000; }
-                       
-                       if(distance < cutoff && itA != itB){
-                                                       
+               
+                       if((distance < cutoff) && (itA != itB)){
                                if(refRow == refCol){           // in other words, if we haven't loaded refRow and refCol...
                                        refRow = itA->second;
                                        refCol = itB->second;
@@ -71,7 +70,7 @@ void FormatColumnMatrix::read(NameAssignment* nameMap){
                }
                out.close();
                fileHandle.close();
-               
+       
                string squareFile;
                if(lt == 0){  // oops, it was square
                        squareFile = filename;
@@ -129,10 +128,13 @@ void FormatColumnMatrix::read(NameAssignment* nameMap){
                                rowMap.clear();
                                
                                //save row you just read
-                               rowMap[second] = dist;
-
+                               if (dist < cutoff) {
+                                       rowMap[second] = dist;
+                               }
                        }else{
-                               rowMap[second] = dist;
+                               if (dist < cutoff) {
+                                       rowMap[second] = dist;
+                               }
                        }
                }