globaldata = GlobalData::getInstance();
string fileNameRoot;
fileNameRoot = getRootName(globaldata->inputFileName);
- groupmap = globaldata->gGroupmap;
+ //groupmap = globaldata->gGroupmap;
int i;
for (i=0; i<globaldata->sharedEstimators.size(); i++) {
if (globaldata->sharedEstimators[i] == "sharedChao") {
- cDisplays.push_back(new CollectDisplay(new SharedChao1(), new SharedOneColumnFile(fileNameRoot+"shared.chao", groupmap->namesOfGroups)));
+ cDisplays.push_back(new CollectDisplay(new SharedChao1(), new SharedOneColumnFile(fileNameRoot+"shared.chao")));
}else if (globaldata->sharedEstimators[i] == "sharedSobs") {
- cDisplays.push_back(new CollectDisplay(new SharedSobs(), new SharedOneColumnFile(fileNameRoot+"shared.sobs", groupmap->namesOfGroups)));
+ cDisplays.push_back(new CollectDisplay(new SharedSobs(), new SharedOneColumnFile(fileNameRoot+"shared.sobs")));
}else if (globaldata->sharedEstimators[i] == "sharedAce") {
- cDisplays.push_back(new CollectDisplay(new SharedAce(), new SharedOneColumnFile(fileNameRoot+"shared.ace", groupmap->namesOfGroups)));
+ cDisplays.push_back(new CollectDisplay(new SharedAce(), new SharedOneColumnFile(fileNameRoot+"shared.ace")));
}else if (globaldata->sharedEstimators[i] == "sharedJabund") {
- cDisplays.push_back(new CollectDisplay(new SharedJAbund(), new SharedOneColumnFile(fileNameRoot+"shared.jabund", groupmap->namesOfGroups)));
+ cDisplays.push_back(new CollectDisplay(new SharedJAbund(), new SharedOneColumnFile(fileNameRoot+"shared.jabund")));
}else if (globaldata->sharedEstimators[i] == "sharedSorensonAbund") {
- cDisplays.push_back(new CollectDisplay(new SharedSorAbund(), new SharedOneColumnFile(fileNameRoot+"shared.sorabund", groupmap->namesOfGroups)));
+ cDisplays.push_back(new CollectDisplay(new SharedSorAbund(), new SharedOneColumnFile(fileNameRoot+"shared.sorabund")));
}else if (globaldata->sharedEstimators[i] == "sharedJclass") {
- cDisplays.push_back(new CollectDisplay(new SharedJclass(), new SharedOneColumnFile(fileNameRoot+"shared.jclass", groupmap->namesOfGroups)));
+ cDisplays.push_back(new CollectDisplay(new SharedJclass(), new SharedOneColumnFile(fileNameRoot+"shared.jclass")));
}else if (globaldata->sharedEstimators[i] == "sharedSorClass") {
- cDisplays.push_back(new CollectDisplay(new SharedSorClass(), new SharedOneColumnFile(fileNameRoot+"shared.sorclass", groupmap->namesOfGroups)));
+ cDisplays.push_back(new CollectDisplay(new SharedSorClass(), new SharedOneColumnFile(fileNameRoot+"shared.sorclass")));
}else if (globaldata->sharedEstimators[i] == "sharedJest") {
- cDisplays.push_back(new CollectDisplay(new SharedJest(), new SharedOneColumnFile(fileNameRoot+"shared.jest", groupmap->namesOfGroups)));
+ cDisplays.push_back(new CollectDisplay(new SharedJest(), new SharedOneColumnFile(fileNameRoot+"shared.jest")));
}else if (globaldata->sharedEstimators[i] == "sharedSorEst") {
- cDisplays.push_back(new CollectDisplay(new SharedSorEst(), new SharedOneColumnFile(fileNameRoot+"shared.sorest", groupmap->namesOfGroups)));
+ cDisplays.push_back(new CollectDisplay(new SharedSorEst(), new SharedOneColumnFile(fileNameRoot+"shared.sorest")));
}else if (globaldata->sharedEstimators[i] == "SharedThetaYC") {
- cDisplays.push_back(new CollectDisplay(new SharedThetaYC(), new SharedOneColumnFile(fileNameRoot+"shared.thetayc", groupmap->namesOfGroups)));
+ cDisplays.push_back(new CollectDisplay(new SharedThetaYC(), new SharedOneColumnFile(fileNameRoot+"shared.thetayc")));
}else if (globaldata->sharedEstimators[i] == "SharedThetaN") {
- cDisplays.push_back(new CollectDisplay(new SharedThetaN(), new SharedOneColumnFile(fileNameRoot+"shared.thetan", groupmap->namesOfGroups)));
+ cDisplays.push_back(new CollectDisplay(new SharedThetaN(), new SharedOneColumnFile(fileNameRoot+"shared.thetan")));
}
}
}
* Dotur
*
* Created by Sarah Westcott on 11/18/08.
- * Copyright 2008 __MyCompanyName__. All rights reserved.
+ * Copyright 2008 Schloss Lab UMASS Amherst. All rights reserved.
*
*/
//randomize the groups
random_shuffle(lookup.begin(), lookup.end());
- //send the first group
- rcd->updateSharedData(lookup[0], lookup[0], 1, numGroupComb);
-
- //send each additional group one at a time
- int n = 1;
- for (int k = 0; k < (lookup.size() - 1); k++) {
- for (int l = n; l < lookup.size(); l++) {
- rcd->updateSharedData(lookup[k], lookup[l], l+1, numGroupComb);
- mergeVectors(lookup[0], lookup[l]);
- }
- n++;
+ //send each group one at a time
+ for (int k = 0; k < lookup.size(); k++) {
+ rcd->updateSharedData(lookup[0], lookup[k], k+1, numGroupComb);
+ mergeVectors(lookup[0], lookup[k]);
}
//resets output files
RareFactSharedCommand::RareFactSharedCommand(){
try {
globaldata = GlobalData::getInstance();
- string fileNameRoot, groups;
+ string fileNameRoot;
fileNameRoot = getRootName(globaldata->inputFileName);
- groupmap = globaldata->gGroupmap;
-
- //initialize groups for label
- groups = "";
- for (int i = 0; i < groupmap->namesOfGroups.size(); i++) {
- groups = groups + groupmap->namesOfGroups[i];
- }
-
+
int i;
for (i=0; i<globaldata->sharedRareEstimators.size(); i++) {
if (globaldata->sharedRareEstimators[i] == "sharedobserved") {
- rDisplays.push_back(new RareDisplay(new SharedSobs(), new SharedThreeColumnFile(fileNameRoot+"r_shared.observed", groups)));
+ rDisplays.push_back(new RareDisplay(new SharedSobs(), new SharedThreeColumnFile(fileNameRoot+"shared.rarefaction", "")));
}
}
}