//if you have a BL
if(t->tree[index].getBranchLength() != -1){
- sum += t->tree[index].getBranchLength();
+ sum += abs(t->tree[index].getBranchLength());
}
index = t->tree[index].getParent();
}
//get last breanch length added
if(t->tree[index].getBranchLength() != -1){
- sum += t->tree[index].getBranchLength();
+ sum += abs(t->tree[index].getBranchLength());
}
//is this sum from a sequence which is in one of the users groups
u -= (double) t->tree[i].pcount[globaldata->Groups[l]] / (double) tmap->seqsPerGroup[globaldata->Groups[l]];
}
- u = abs(u) * t->tree[i].getBranchLength();
+ u = abs(u * t->tree[i].getBranchLength());
//save groupcombs u value
WScore[globaldata->Groups[b]+globaldata->Groups[l]] += u;
return data;
}
catch(exception& e) {
- cout << "Standard Error: " << e.what() << " has occurred in the Weighted class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+ errorOut(e, "Weighted", "getValues");
exit(1);
}
- catch(...) {
- cout << "An unknown error has occurred in the Weighted class function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
- exit(1);
- }
-
}
/**************************************************************************************************/
//if you have a BL
if(t->tree[index].getBranchLength() != -1){
- sum += t->tree[index].getBranchLength();
+ sum += abs(t->tree[index].getBranchLength());
}
index = t->tree[index].getParent();
}
//get last breanch length added
if(t->tree[index].getBranchLength() != -1){
- sum += t->tree[index].getBranchLength();
+ sum += abs(t->tree[index].getBranchLength());
}
if ((t->tree[v].getGroup() == groupA) || (t->tree[v].getGroup() == groupB)) {
u -= (double) t->tree[i].pcount[groupB] / (double) tmap->seqsPerGroup[groupB];
}
- u = abs(u) * t->tree[i].getBranchLength();
+ u = abs(u * t->tree[i].getBranchLength());
//save groupcombs u value
WScore[(groupA+groupB)] += u;
return data;
}
catch(exception& e) {
- cout << "Standard Error: " << e.what() << " has occurred in the Weighted class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+ errorOut(e, "Weighted", "getValues");
exit(1);
}
- catch(...) {
- cout << "An unknown error has occurred in the Weighted class function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
- exit(1);
- }
-
}