int numGroups = Sets.size();
for (int a=0; a<numGroups; a++) {
- for (int l = a+1; l < numGroups; l++) {
+ for (int l = 0; l < a; l++) {
vector<string> groups; groups.push_back(Sets[a]); groups.push_back(Sets[l]);
namesOfGroupCombos.push_back(groups);
}
numComp = 0;
for (int i=0; i< userGroups.size(); i++) {
numComp += i;
- for (int l = i+1; l < userGroups.size(); l++) {
- //set group comparison labels
- groupComb.push_back(userGroups[i] + "-" + userGroups[l]);
+ for (int l = 0; l < i; l++) {
+ if (userGroups[i] > userGroups[l]) {
+ //set group comparison labels
+ groupComb.push_back(userGroups[l] + "-" + userGroups[i]);
+ }else{
+ groupComb.push_back(userGroups[i] + "-" + userGroups[l]);
+ }
}
}
}
input = globaldata->ginput;
lookup = input->getSharedRAbundVectors();
string lastLabel = lookup[0]->getLabel();
-
+
/******************************************************/
//output headings for files
/******************************************************/
#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)
if(processors == 1){
- driver(thisLookup, 0, numGroups, sumFileName, sumAllFileName);
+ driver(thisLookup, 0, numGroups, sumFileName+".temp", sumAllFileName+".temp");
m->appendFiles((sumFileName + ".temp"), sumFileName);
remove((sumFileName + ".temp").c_str());
if (mult) {
//calculate number of comparisons i.e. with groups A,B,C = AB, AC, BC = 3;
vector< vector<string> > namesOfGroupCombos;
for (int a=0; a<numGroups; a++) {
- for (int l = a+1; l < numGroups; l++) {
+ for (int l = 0; l < a; l++) {
vector<string> groups; groups.push_back(globaldata->Groups[a]); groups.push_back(globaldata->Groups[l]);
namesOfGroupCombos.push_back(groups);
}
int numComp = 0;
vector< vector<string> > namesOfGroupCombos;
for (int r=0; r<numGroups; r++) {
- for (int l = r+1; l < numGroups; l++) {
+ for (int l = 0; l < r; l++) {
numComp++;
vector<string> groups; groups.push_back(globaldata->Groups[r]); groups.push_back(globaldata->Groups[l]);
namesOfGroupCombos.push_back(groups);
int numComp = 0;
vector< vector<string> > namesOfGroupCombos;
for (int r=0; r<numGroups; r++) {
- for (int l = r+1; l < numGroups; l++) {
+ for (int l = 0; l < r; l++) {
numComp++;
vector<string> groups; groups.push_back(globaldata->Groups[r]); groups.push_back(globaldata->Groups[l]);
namesOfGroupCombos.push_back(groups);
//calculate number of comparisons i.e. with groups A,B,C = AB, AC, BC = 3;
vector< vector<string> > namesOfGroupCombos;
for (int i=0; i<numGroups; i++) {
- for (int l = i+1; l < numGroups; l++) {
+ for (int l = 0; l < i; l++) {
//initialize weighted scores
//WScore[globaldata->Groups[i]+globaldata->Groups[l]] = 0.0;
vector<string> groups; groups.push_back(globaldata->Groups[i]); groups.push_back(globaldata->Groups[l]);