lines.push_back(linePair(startPos, numPairsPerProcessor));
}
-
data = createProcesses(t, namesOfGroupCombos);
lines.clear();
}
try {
#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)
int process = 1;
- int num = 0;
vector<int> processIDS;
EstOutput results;
out.close();
exit(0);
- }else { m->mothurOut("unable to spawn the necessary processes."); m->mothurOutEndLine(); exit(0); }
+ }else {
+ m->mothurOut("[ERROR]: unable to spawn the necessary processes."); m->mothurOutEndLine();
+ for (int i = 0; i < processIDS.size(); i++) { kill (processIDS[i], SIGINT); }
+ exit(0);
+ }
}
results = driver(t, namesOfGroupCombos, lines[0].start, lines[0].num);
}
}else if ((nodePcountSize[lc] == 0) && (nodePcountSize[rc] == 0)) { tempTotals[i] = 0.0; //we don't care about you
}else { //if no, your tempTotal is your childrens temp totals + your branch length
- tempTotals[i] = tempTotals[lc] + tempTotals[rc] + abs(t->tree[i].getBranchLength());
+ if (t->tree[i].getBranchLength() != -1) {
+ tempTotals[i] = tempTotals[lc] + tempTotals[rc] + abs(t->tree[i].getBranchLength());
+ }else {
+ tempTotals[i] = tempTotals[lc] + tempTotals[rc];
+ }
}
//cout << "temptotal = "<< tempTotals[i] << endl;
}
}
lines.push_back(linePair(startPos, numPairsPerProcessor));
}
-
+
data = createProcesses(t, namesOfGroupCombos, true);
lines.clear();
try {
#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)
int process = 1;
- int num = 0;
vector<int> processIDS;
EstOutput results;
out.close();
exit(0);
- }else { m->mothurOut("unable to spawn the necessary processes."); m->mothurOutEndLine(); exit(0); }
+ }else {
+ m->mothurOut("[ERROR]: unable to spawn the necessary processes."); m->mothurOutEndLine();
+ for (int i = 0; i < processIDS.size(); i++) { kill (processIDS[i], SIGINT); }
+ exit(0);
+ }
}
results = driver(t, namesOfGroupCombos, lines[0].start, lines[0].num, usingGroups);
if (!in.eof()) {
int num;
in >> num; m->gobble(in);
-
+
if (m->control_pressed) { break; }
double w;
for (int j = 0; j < num; j++) {
in >> w;
+
results.push_back(w);
}
m->gobble(in);
EstOutput results; results.resize(num);
int count = 0;
- int total = num;
- int twentyPercent = (total * 0.20);
int numLeaves = t->getNumLeaves();
Tree* copyTree = new Tree;
}
}else if ((nodePcountSize[lc] == 0) && (nodePcountSize[rc] == 0)) { tempTotals[i] = 0.0; //we don't care about you
}else { //if no, your tempTotal is your childrens temp totals + your branch length
- tempTotals[i] = tempTotals[lc] + tempTotals[rc] + abs(copyTree->tree[i].getBranchLength());
+ if (t->tree[i].getBranchLength() != -1) {
+ tempTotals[i] = tempTotals[lc] + tempTotals[rc] + abs(copyTree->tree[i].getBranchLength());
+ }else {
+ tempTotals[i] = tempTotals[lc] + tempTotals[rc];
+ }
}
}