+ //save groupcombs u value
+ WScore[tmap->namesOfGroups[b-1]+tmap->namesOfGroups[l]] += u;
+
+ //the user has entered specific groups
+ }else {
+ //does this node have descendants from group b-1
+ it = t->tree[i].pcount.find(globaldata->Groups[b-1]);
+ //if it does u = # of its descendants with a certain group / total number in tree with a certain group
+ if (it != t->tree[i].pcount.end()) {
+ u = (double) t->tree[i].pcount[globaldata->Groups[b-1]] / (double) tmap->seqsPerGroup[globaldata->Groups[b-1]];
+ }else { u = 0.00; }
+
+ //does this node have descendants from group l
+ it = t->tree[i].pcount.find(globaldata->Groups[l]);
+ //if it does subtract their percentage from u
+ if (it != t->tree[i].pcount.end()) {
+ u -= (double) t->tree[i].pcount[globaldata->Groups[l]] / (double) tmap->seqsPerGroup[globaldata->Groups[l]];
+ }
+
+ u = abs(u) * t->tree[i].getBranchLength();
+
+ //save groupcombs u value
+ WScore[globaldata->Groups[b-1]+globaldata->Groups[l]] += u;
+ }