]> git.donarmstrong.com Git - mothur.git/blobdiff - weighted.cpp
rewrote metastats command in c++, added mothurRemove function to handle ~ error....
[mothur.git] / weighted.cpp
index cae2b92885632b697852babccd84d463b7a78564..70f6ae3eb1d621722ebd11221e88c92cc83b78eb 100644 (file)
 
 EstOutput Weighted::getValues(Tree* t, int p, string o) {
     try {
-               globaldata = GlobalData::getInstance();
-               
                data.clear(); //clear out old values
                int numGroups;
                vector<double> D;
                processors = p;
                outputDir = o;
                
-               numGroups = globaldata->Groups.size();
+               numGroups = m->Groups.size();
                
                if (m->control_pressed) { return data; }
                
@@ -31,7 +29,7 @@ EstOutput Weighted::getValues(Tree* t, int p, string o) {
                        for (int l = 0; l < i; l++) {   
                                //initialize weighted scores
                                //WScore[globaldata->Groups[i]+globaldata->Groups[l]] = 0.0;
-                               vector<string> groups; groups.push_back(globaldata->Groups[i]); groups.push_back(globaldata->Groups[l]);
+                               vector<string> groups; groups.push_back(m->Groups[i]); groups.push_back(m->Groups[l]);
                                namesOfGroupCombos.push_back(groups);
                        }
                }
@@ -141,7 +139,7 @@ EstOutput Weighted::createProcesses(Tree* t, vector< vector<string> > namesOfGro
                                m->gobble(in);
                        }
                        in.close();
-                       remove(s.c_str());
+                       m->mothurRemove(s);
                }
                
                m->mothurOut("DONE."); m->mothurOutEndLine(); m->mothurOutEndLine();
@@ -267,7 +265,6 @@ EstOutput Weighted::driver(Tree* t, vector< vector<string> > namesOfGroupCombos,
 /**************************************************************************************************/
 EstOutput Weighted::getValues(Tree* t, string groupA, string groupB) { 
  try {
-               globaldata = GlobalData::getInstance();
                
                data.clear(); //clear out old values