#include "collectcommand.h"
#include "ace.h"
#include "sobs.h"
+#include "nseqs.h"
#include "chao1.h"
#include "bootstrap.h"
#include "simpson.h"
#include "npshannon.h"
#include "shannon.h"
#include "jackknife.h"
+#include "geom.h"
+#include "qstat.h"
+#include "logsd.h"
+#include "bergerparker.h"
+#include "bstick.h"
//**********************************************************************************************************************
-
-
CollectCommand::CollectCommand(){
try {
globaldata = GlobalData::getInstance();
fileNameRoot = getRootName(globaldata->inputFileName);
int i;
validCalculator = new ValidCalculators();
-
for (i=0; i<globaldata->Estimators.size(); i++) {
if (validCalculator->isValidCalculator("single", globaldata->Estimators[i]) == true) {
if (globaldata->Estimators[i] == "sobs") {
cDisplays.push_back(new CollectDisplay(new Sobs(), new OneColumnFile(fileNameRoot+"sobs")));
}else if (globaldata->Estimators[i] == "chao") {
cDisplays.push_back(new CollectDisplay(new Chao1(), new ThreeColumnFile(fileNameRoot+"chao")));
+ }else if (globaldata->Estimators[i] == "nseqs") {
+ cDisplays.push_back(new CollectDisplay(new NSeqs(), new OneColumnFile(fileNameRoot+"nseqs")));
}else if (globaldata->Estimators[i] == "ace") {
- convert(globaldata->getAbund(), abund);
+ convert(globaldata->getAbund(), abund);
cDisplays.push_back(new CollectDisplay(new Ace(abund), new ThreeColumnFile(fileNameRoot+"ace")));
}else if (globaldata->Estimators[i] == "jack") {
cDisplays.push_back(new CollectDisplay(new Jackknife(), new ThreeColumnFile(fileNameRoot+"jack")));
cDisplays.push_back(new CollectDisplay(new Simpson(), new ThreeColumnFile(fileNameRoot+"simpson")));
}else if (globaldata->Estimators[i] == "bootstrap") {
cDisplays.push_back(new CollectDisplay(new Bootstrap(), new OneColumnFile(fileNameRoot+"bootstrap")));
+ }else if (globaldata->Estimators[i] == "geom") {
+ cDisplays.push_back(new CollectDisplay(new Geom(), new OneColumnFile(fileNameRoot+"geom")));
+ }else if (globaldata->Estimators[i] == "qstat") {
+ cDisplays.push_back(new CollectDisplay(new QStat(), new OneColumnFile(fileNameRoot+"qstat")));
+ }else if (globaldata->Estimators[i] == "logsd") {
+ cDisplays.push_back(new CollectDisplay(new LogSD(), new OneColumnFile(fileNameRoot+"logsd")));
+ }else if (globaldata->Estimators[i] == "bergerparker") {
+ cDisplays.push_back(new CollectDisplay(new BergerParker(), new OneColumnFile(fileNameRoot+"bergerparker")));
+ }else if (globaldata->Estimators[i] == "bstick") {
+ cDisplays.push_back(new CollectDisplay(new BStick(), new OneColumnFile(fileNameRoot+"bstick")));
}
}
}
for(i = globaldata->labels.begin(); i != globaldata->labels.end(); ++i)
if(orderList.count(*i) == 0)
cout << "'" << *i << "'" << " is not a valid label.\n";
- globaldata->clearLabels();
for(int i=0;i<cDisplays.size();i++){ delete cDisplays[i]; }
return 0;
}