]> git.donarmstrong.com Git - mothur.git/blobdiff - taxonomyequalizer.cpp
added get.otus and remove.otus commands
[mothur.git] / taxonomyequalizer.cpp
index c7e8cb9e4add8388602dc2bfc12cff28673f7db3..d3b24d1297f280f0b4f11a30724a3c9d61d8427f 100644 (file)
@@ -16,7 +16,7 @@ TaxEqualizer::TaxEqualizer(string tfile, int c, string o) : cutoff(c), outputDir
                containsConfidence = false;
                
                ifstream inTax;
-               openInputFile(tfile, inTax);
+               m->openInputFile(tfile, inTax);
        
                highestLevel = getHighestLevel(inTax);
                
@@ -32,11 +32,11 @@ TaxEqualizer::TaxEqualizer(string tfile, int c, string o) : cutoff(c), outputDir
                        
                        inTax.close(); 
                        ifstream in; 
-                       openInputFile(tfile, in);
+                       m->openInputFile(tfile, in);
                        
                        ofstream out;
-                       equalizedFile = outputDir + getRootName(getSimpleName(tfile)) + "equalized.taxonomy";
-                       openOutputFile(equalizedFile, out);
+                       equalizedFile = outputDir + m->getRootName(m->getSimpleName(tfile)) + "equalized.taxonomy";
+                       m->openOutputFile(equalizedFile, out);
                        
        
                        string name, tax;
@@ -44,7 +44,7 @@ TaxEqualizer::TaxEqualizer(string tfile, int c, string o) : cutoff(c), outputDir
                        
                                if (m->control_pressed) {  break; }
                                
-                               in >> name >> tax;   gobble(in);
+                               in >> name >> tax;   m->gobble(in);
                                
                                if (containsConfidence) {  removeConfidences(tax);      }
                                
@@ -78,7 +78,7 @@ int TaxEqualizer::getHighestLevel(ifstream& in) {
                string name, tax;
                
                while (in) {
-                       in >> name >> tax;   gobble(in);
+                       in >> name >> tax;   m->gobble(in);
                
                        //count levels in this taxonomy
                        int thisLevel = 0;
@@ -88,19 +88,19 @@ int TaxEqualizer::getHighestLevel(ifstream& in) {
                
                        //save sequences level
                        seqLevels[name] = thisLevel;
-               
+       
                        //is this the longest taxonomy?
                        if (thisLevel > level) {  
                                level = thisLevel;  
                                testTax = tax; //testTax is used to figure out if this file has confidences we need to strip out
-                       }  
+                       } 
                }
                
                int pos = testTax.find_first_of('(');
 
                //if there are '(' then there are confidences we need to take out
                if (pos != -1) {  containsConfidence = true;  }
-               
+       
                return level;
                                        
        }