]> git.donarmstrong.com Git - mothur.git/blobdiff - taxonomyequalizer.cpp
edited taxonomy equalizer to fix bug with windows
[mothur.git] / taxonomyequalizer.cpp
index e7fa07af76ea792137475c6dff67b2ec0c9bcf7c..c84c439a9efbc3633372ffe3ff3461f127dae171 100644 (file)
@@ -27,16 +27,17 @@ TaxEqualizer::TaxEqualizer(string tfile, int c) : cutoff(c) {
                        mothurOutEndLine();
                }
                
-               inTax.close();  
-               openInputFile(tfile, inTax);
+               inTax.close(); 
+               ifstream in; 
+               openInputFile(tfile, in);
                
                ofstream out;
                equalizedFile = getRootName(tfile) + "equalized.taxonomy";
                openOutputFile(equalizedFile, out);
                
                string name, tax;
-               while (inTax) {
-                       inTax >> name >> tax;   gobble(inTax);
+               while (in) {
+                       in >> name >> tax;   gobble(in);
                        
                        if (containsConfidence) {  removeConfidences(tax);      }
                        
@@ -50,7 +51,7 @@ TaxEqualizer::TaxEqualizer(string tfile, int c) : cutoff(c) {
                        out << name << '\t' << tax << endl;
                }
                
-               inTax.close();
+               in.close();
                out.close();
                                        
        }