]> git.donarmstrong.com Git - mothur.git/blobdiff - readcolumn.cpp
removed read.dist, read.otu, read.tree and globaldata. added current to defaults...
[mothur.git] / readcolumn.cpp
index 2782bd08a84efd8a596364f14c56015e04407241..f6f26d512f1a11dffa1de864e971d29dd919884c 100644 (file)
 ReadColumnMatrix::ReadColumnMatrix(string df) : distFile(df){
        
        successOpen = m->openInputFile(distFile, fileHandle);
+       sim = false;
        
 }
+/***********************************************************************/
+
+ReadColumnMatrix::ReadColumnMatrix(string df, bool s) : distFile(df){
+       
+       successOpen = m->openInputFile(distFile, fileHandle);
+       sim = s;
+}
 
 /***********************************************************************/
 
@@ -56,7 +64,7 @@ int ReadColumnMatrix::read(NameAssignment* nameMap){
 //if (((itA->second == 8) && (itB->second == 1588)) || ((itA->second == 1588) && (itB->second == 8))) { cout << "found it" << endl; }
 
                        if (distance == -1) { distance = 1000000; }
-                       else if (globaldata->sim) { distance = 1.0 - distance;  }  //user has entered a sim matrix that we need to convert.
+                       else if (sim) { distance = 1.0 - distance;  }  //user has entered a sim matrix that we need to convert.
                        
                        if(distance < cutoff && itA != itB){
                                if(itA->second > itB->second){
@@ -117,7 +125,7 @@ int ReadColumnMatrix::read(NameAssignment* nameMap){
                                }
                                
                                if (distance == -1) { distance = 1000000; }
-                               else if (globaldata->sim) { distance = 1.0 - distance;  }  //user has entered a sim matrix that we need to convert.
+                               else if (sim) { distance = 1.0 - distance;  }  //user has entered a sim matrix that we need to convert.
                                
                                if(distance < cutoff && itA->second > itB->second){
                                        PCell value(itA->second, itB->second, distance);