try {
#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)
int process = 1;
- int num = 0;
vector<int> processIDS;
EstOutput results;
for (int h = start; h < (start+num); h++) {
//report progress
m->mothurOut("Processing combo: " + toString(h)); m->mothurOutEndLine();
-
- int numLeaves = t->getNumLeaves();
-
+
string groupA = namesOfGroupCombos[h][0];
string groupB = namesOfGroupCombos[h][1];
//if this is not the root then add it
if (rootForGrouping[namesOfGroupCombos[h]].count(i) == 0) {
- u = abs(u * t->tree[i].getBranchLength());
- WScore[(groupA+groupB)] += u;
+ if (t->tree[i].getBranchLength() != -1) {
+ u = abs(u * t->tree[i].getBranchLength());
+ WScore[(groupA+groupB)] += u;
+ }
}
+
}
}
count = 0;
for (int h = start; h < (start+num); h++) {
UN = (WScore[namesOfGroupCombos[h][0]+namesOfGroupCombos[h][1]] / D[count]);
-
if (isnan(UN) || isinf(UN)) { UN = 0; }
results.push_back(UN);
count++;
D += weightedSum;
}
-
- int numLeaves = t->getNumLeaves();
-
+
//calculate u for the group comb
for(int i=0;i<t->getNumNodes();i++){
//if this is not the root then add it
if (rootForGrouping[groups].count(i) == 0) {
- u = abs(u * t->tree[i].getBranchLength());
- WScore[(groupA+groupB)] += u;
+ if (t->tree[i].getBranchLength() != -1) {
+ u = abs(u * t->tree[i].getBranchLength());
+ WScore[(groupA+groupB)] += u;
+ }
}
}
/********************************************************/
-
+
//calculate weighted score for the group combination
double UN;
UN = (WScore[(groupA+groupB)] / D);