]> git.donarmstrong.com Git - mothur.git/blobdiff - parsimony.cpp
added cutoff change to hcluster
[mothur.git] / parsimony.cpp
index 4ec5e1ba7d31495ebef7b5efaf2b7e6bbc82ad7c..54a3ffd93180376ff8a1efe67b121af3d36b9bc2 100644 (file)
 
 EstOutput Parsimony::getValues(Tree* t, int p, string o) {
        try {
-               globaldata = GlobalData::getInstance();
                processors = p;
                outputDir = o;
                
                //if the users enters no groups then give them the score of all groups
-               int numGroups = globaldata->Groups.size();
+               int numGroups = m->Groups.size();
                
                //calculate number of comparsions
                int numComp = 0;
@@ -26,7 +25,7 @@ EstOutput Parsimony::getValues(Tree* t, int p, string o) {
                for (int r=0; r<numGroups; r++) { 
                        for (int l = r+1; l < numGroups; l++) {
                                numComp++;
-                               vector<string> groups; groups.push_back(globaldata->Groups[r]); groups.push_back(globaldata->Groups[l]);
+                               vector<string> groups; groups.push_back(m->Groups[r]); groups.push_back(m->Groups[l]);
                                //cout << globaldata->Groups[r] << '\t' << globaldata->Groups[l] << endl;
                                namesOfGroupCombos.push_back(groups);
                        }
@@ -45,8 +44,8 @@ EstOutput Parsimony::getValues(Tree* t, int p, string o) {
                                }
                                namesOfGroupCombos.push_back(groups);
                        }else {
-                               for (int i = 0; i < globaldata->Groups.size(); i++) {
-                                       groups.push_back(globaldata->Groups[i]);
+                               for (int i = 0; i < m->Groups.size(); i++) {
+                                       groups.push_back(m->Groups[i]);
                                        //cout << globaldata->Groups[i] << endl;
                                }
                                namesOfGroupCombos.push_back(groups);
@@ -92,7 +91,6 @@ EstOutput Parsimony::createProcesses(Tree* t, vector< vector<string> > namesOfGr
        try {
 #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)
                int process = 1;
-               int num = 0;
                vector<int> processIDS;
                
                EstOutput results;
@@ -174,7 +172,7 @@ EstOutput Parsimony::driver(Tree* t, vector< vector<string> > namesOfGroupCombos
                
                EstOutput results; results.resize(num);
                
-               Tree* copyTree = new Tree();
+               Tree* copyTree = new Tree(tmap);
                int count = 0;
                
                for (int h = start; h < (start+num); h++) {