+ if (m->control_pressed) { if (hadShared != "") { globaldata->setSharedFile(hadShared); globaldata->setFormat("sharedfile"); } return 0; }
+
+ if (inputFileNames.size() > 1) {
+ m->mothurOutEndLine(); m->mothurOut("Processing group " + groups[p]); m->mothurOutEndLine(); m->mothurOutEndLine();
+ }
+ int i;
+ validCalculator = new ValidCalculators();
+
+
+ for (i=0; i<Estimators.size(); i++) {
+ if (validCalculator->isValidCalculator("rarefaction", Estimators[i]) == true) {
+ if (Estimators[i] == "sobs") {
+ rDisplays.push_back(new RareDisplay(new Sobs(), new ThreeColumnFile(fileNameRoot+"rarefaction")));
+ outputNames.push_back(fileNameRoot+"rarefaction");
+ }else if (Estimators[i] == "chao") {
+ rDisplays.push_back(new RareDisplay(new Chao1(), new ThreeColumnFile(fileNameRoot+"r_chao")));
+ outputNames.push_back(fileNameRoot+"r_chao");
+ }else if (Estimators[i] == "ace") {
+ if(abund < 5)
+ abund = 10;
+ rDisplays.push_back(new RareDisplay(new Ace(abund), new ThreeColumnFile(fileNameRoot+"r_ace")));
+ outputNames.push_back(fileNameRoot+"r_ace");
+ }else if (Estimators[i] == "jack") {
+ rDisplays.push_back(new RareDisplay(new Jackknife(), new ThreeColumnFile(fileNameRoot+"r_jack")));
+ outputNames.push_back(fileNameRoot+"r_jack");
+ }else if (Estimators[i] == "shannon") {
+ rDisplays.push_back(new RareDisplay(new Shannon(), new ThreeColumnFile(fileNameRoot+"r_shannon")));
+ outputNames.push_back(fileNameRoot+"r_shannon");
+ }else if (Estimators[i] == "shannoneven") {
+ rDisplays.push_back(new RareDisplay(new ShannonEven(), new ThreeColumnFile(fileNameRoot+"r_shannoneven")));
+ outputNames.push_back(fileNameRoot+"r_shannoneven");
+ }else if (Estimators[i] == "heip") {
+ rDisplays.push_back(new RareDisplay(new Heip(), new ThreeColumnFile(fileNameRoot+"r_heip")));
+ outputNames.push_back(fileNameRoot+"r_heip");
+ }else if (Estimators[i] == "smithwilson") {
+ rDisplays.push_back(new RareDisplay(new SmithWilson(), new ThreeColumnFile(fileNameRoot+"r_smithwilson")));
+ outputNames.push_back(fileNameRoot+"r_smithwilson");
+ }else if (Estimators[i] == "npshannon") {
+ rDisplays.push_back(new RareDisplay(new NPShannon(), new ThreeColumnFile(fileNameRoot+"r_npshannon")));
+ outputNames.push_back(fileNameRoot+"r_npshannon");
+ }else if (Estimators[i] == "simpson") {
+ rDisplays.push_back(new RareDisplay(new Simpson(), new ThreeColumnFile(fileNameRoot+"r_simpson")));
+ outputNames.push_back(fileNameRoot+"r_simpson");
+ }else if (Estimators[i] == "simpsoneven") {
+ rDisplays.push_back(new RareDisplay(new SimpsonEven(), new ThreeColumnFile(fileNameRoot+"r_simpsoneven")));
+ outputNames.push_back(fileNameRoot+"r_simpsoneven");
+ }else if (Estimators[i] == "invsimpson") {
+ rDisplays.push_back(new RareDisplay(new InvSimpson(), new ThreeColumnFile(fileNameRoot+"r_invsimpson")));
+ outputNames.push_back(fileNameRoot+"r_invsimpson");
+ }else if (Estimators[i] == "bootstrap") {
+ rDisplays.push_back(new RareDisplay(new Bootstrap(), new ThreeColumnFile(fileNameRoot+"r_bootstrap")));
+ outputNames.push_back(fileNameRoot+"r_bootstrap");
+ }else if (Estimators[i] == "coverage") {
+ rDisplays.push_back(new RareDisplay(new Coverage(), new ThreeColumnFile(fileNameRoot+"r_coverage")));
+ outputNames.push_back(fileNameRoot+"r_coverage");
+ }else if (Estimators[i] == "nseqs") {
+ rDisplays.push_back(new RareDisplay(new NSeqs(), new ThreeColumnFile(fileNameRoot+"r_nseqs")));
+ outputNames.push_back(fileNameRoot+"r_nseqs");
+ }
+ }
+ }
+
+
+ //if the users entered no valid calculators don't execute command
+ if (rDisplays.size() == 0) { for(int i=0;i<rDisplays.size();i++){ delete rDisplays[i]; } delete validCalculator; return 0; }
+
+ read = new ReadOTUFile(globaldata->inputFileName);
+ read->read(&*globaldata);