]> git.donarmstrong.com Git - mothur.git/blobdiff - rarefactcommand.cpp
modified some calculators and other stuff - pds
[mothur.git] / rarefactcommand.cpp
index 7e4ced55244665b4c3540f71491ce6dd4f003517..6e4197f7f8b4a9029709a9d4ab31f51c246d840b 100644 (file)
 #include "rarefactcommand.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 "coverage.h"
 
 //**********************************************************************************************************************
 
@@ -35,7 +37,10 @@ RareFactCommand::RareFactCommand(){
                                }else if (globaldata->Estimators[i] == "chao") { 
                                        rDisplays.push_back(new RareDisplay(new Chao1(), new ThreeColumnFile(fileNameRoot+"r_chao")));
                                }else if (globaldata->Estimators[i] == "ace") { 
-                                       rDisplays.push_back(new RareDisplay(new Ace(), new ThreeColumnFile(fileNameRoot+"r_ace")));
+                                       convert(globaldata->getAbund(), abund);
+                                       if(abund < 5)
+                                               abund = 10;
+                                       rDisplays.push_back(new RareDisplay(new Ace(abund), new ThreeColumnFile(fileNameRoot+"r_ace")));
                                }else if (globaldata->Estimators[i] == "jack") { 
                                        rDisplays.push_back(new RareDisplay(new Jackknife(), new ThreeColumnFile(fileNameRoot+"r_jack")));
                                }else if (globaldata->Estimators[i] == "shannon") { 
@@ -46,6 +51,10 @@ RareFactCommand::RareFactCommand(){
                                        rDisplays.push_back(new RareDisplay(new Simpson(), new ThreeColumnFile(fileNameRoot+"r_simpson")));
                                }else if (globaldata->Estimators[i] == "bootstrap") { 
                                        rDisplays.push_back(new RareDisplay(new Bootstrap(), new ThreeColumnFile(fileNameRoot+"r_bootstrap")));
+                               }else if (globaldata->Estimators[i] == "coverage") { 
+                                       rDisplays.push_back(new RareDisplay(new Coverage(), new ThreeColumnFile(fileNameRoot+"r_coverage")));
+                               }else if (globaldata->Estimators[i] == "nseqs") { 
+                                       rDisplays.push_back(new RareDisplay(new NSeqs(), new ThreeColumnFile(fileNameRoot+"r_nseqs")));
                                }
                        }
                }
@@ -83,7 +92,7 @@ int RareFactCommand::execute(){
                //if the users entered no valid calculators don't execute command
                if (rDisplays.size() == 0) { return 0; }
 
-               read = new ReadPhilFile(globaldata->inputFileName);     
+               read = new ReadOTUFile(globaldata->inputFileName);      
                read->read(&*globaldata); 
 
                order = globaldata->gorder;