X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=collectcommand.cpp;h=233b7bef963a22bdc0ab9a2e524699bc49e4366c;hb=fb01d5df390a98313ca095a812fc240dc079d084;hp=c716732474da857a38bee138931b4a769cca4aa1;hpb=5e7c1cf6a6dd289a90d27c0eef7eb4675b5e17b7;p=mothur.git diff --git a/collectcommand.cpp b/collectcommand.cpp index c716732..233b7be 100644 --- a/collectcommand.cpp +++ b/collectcommand.cpp @@ -10,17 +10,25 @@ #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" +#include "goodscoverage.h" -//********************************************************************************************************************** +#include "coverage.h" +//********************************************************************************************************************** CollectCommand::CollectCommand(){ try { globaldata = GlobalData::getInstance(); @@ -28,15 +36,18 @@ CollectCommand::CollectCommand(){ fileNameRoot = getRootName(globaldata->inputFileName); int i; validCalculator = new ValidCalculators(); - for (i=0; iEstimators.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] == "coverage") { + cDisplays.push_back(new CollectDisplay(new Coverage(), new OneColumnFile(fileNameRoot+"coverage"))); }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"))); @@ -48,6 +59,18 @@ CollectCommand::CollectCommand(){ 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] == "geometric") { + cDisplays.push_back(new CollectDisplay(new Geom(), new OneColumnFile(fileNameRoot+"geometric"))); + }else if (globaldata->Estimators[i] == "qstat") { + cDisplays.push_back(new CollectDisplay(new QStat(), new OneColumnFile(fileNameRoot+"qstat"))); + }else if (globaldata->Estimators[i] == "logseries") { + cDisplays.push_back(new CollectDisplay(new LogSD(), new OneColumnFile(fileNameRoot+"logseries"))); + }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 ThreeColumnFile(fileNameRoot+"bstick"))); + }else if (globaldata->Estimators[i] == "goodscoverage") { + cDisplays.push_back(new CollectDisplay(new GoodsCoverage(), new OneColumnFile(fileNameRoot+"goodscoverage"))); } } } @@ -84,7 +107,7 @@ int CollectCommand::execute(){ //if the users entered no valid calculators don't execute command if (cDisplays.size() == 0) { return 0; } - read = new ReadPhilFile(globaldata->inputFileName); + read = new ReadOTUFile(globaldata->inputFileName); read->read(&*globaldata); order = globaldata->gorder; @@ -103,6 +126,8 @@ int CollectCommand::execute(){ cout << order->getLabel() << '\t' << count << endl; } + + delete order; order = (input->getOrderVector()); count++; } @@ -110,7 +135,6 @@ int CollectCommand::execute(){ 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