]> git.donarmstrong.com Git - mothur.git/blobdiff - collectcommand.cpp
modified some calculators and other stuff - pds
[mothur.git] / collectcommand.cpp
index 000f85d1d91f3922766f024d71dc157640b2eabe..2687f9249fe3aa54b3641b0e4430e9e25da65813 100644 (file)
 #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 "coverage.h"
 
 //**********************************************************************************************************************
-
-
 CollectCommand::CollectCommand(){
        try {
                globaldata = GlobalData::getInstance();
@@ -29,7 +32,6 @@ CollectCommand::CollectCommand(){
                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") { 
@@ -38,6 +40,8 @@ CollectCommand::CollectCommand(){
                                        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);
                                        cDisplays.push_back(new CollectDisplay(new Ace(abund), new ThreeColumnFile(fileNameRoot+"ace")));
@@ -51,6 +55,16 @@ 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 OneColumnFile(fileNameRoot+"bstick")));
                                }
                        }
                }
@@ -87,7 +101,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;