#include "sharedsobscollectsummary.h"
#include "sharedchao1.h"
#include "sharedace.h"
+#include "nseqs.h"
//**********************************************************************************************************************
//if the user changes the output directory command factory will send this info to us in the output parameter
outputDir = validParameter.validFile(parameters, "outputdir", false); if (outputDir == "not found"){
outputDir = "";
- outputDir += hasPath(globaldata->inputFileName); //if user entered a file with a path then preserve it
+ outputDir += m->hasPath(globaldata->inputFileName); //if user entered a file with a path then preserve it
}
//check for optional parameter and set defaults
label = validParameter.validFile(parameters, "label", false);
if (label == "not found") { label = ""; }
else {
- if(label != "all") { splitAtDash(label, labels); allLines = 0; }
+ if(label != "all") { m->splitAtDash(label, labels); allLines = 0; }
else { allLines = 1; }
}
groups = validParameter.validFile(parameters, "groups", false);
if (groups == "not found") { groups = ""; }
else {
- splitAtDash(groups, Groups);
+ m->splitAtDash(groups, Groups);
globaldata->Groups = Groups;
}
else { calc = "sharedsobs"; }
}
}
- splitAtDash(calc, Estimators);
+ m->splitAtDash(calc, Estimators);
string temp;
temp = validParameter.validFile(parameters, "abund", false); if (temp == "not found") { temp = "10"; }
if(abund < 5)
abund = 10;
vennCalculators.push_back(new Ace(abund));
+ }else if (Estimators[i] == "nseqs") {
+ vennCalculators.push_back(new NSeqs());
}
}
}
vennCalculators.push_back(new SharedChao1());
}else if (Estimators[i] == "sharedace") {
vennCalculators.push_back(new SharedAce());
+ }else if (Estimators[i] == "nseqs") {
+ vennCalculators.push_back(new NSeqs());
}
}
}
}
- venn = new Venn(outputDir);
+ //if the users entered no valid calculators don't execute command
+ if (vennCalculators.size() == 0) { m->mothurOut("No valid calculators given, please correct."); m->mothurOutEndLine(); abort = true; }
+ else { venn = new Venn(outputDir); }
}
+
}
string lastLabel;
vector<string> outputNames;
- //if the users entered no valid calculators don't execute command
- if (vennCalculators.size() == 0) { return 0; }
-
if (format == "sharedfile") {
//you have groups
read = new ReadOTUFile(globaldata->inputFileName);
for(int i = 0; i < outfilenames.size(); i++) { if (outfilenames[i] != "control" ) { outputNames.push_back(outfilenames[i]); } }
}
- if ((anyLabelsToProcess(lookup[0]->getLabel(), userLabels, "") == true) && (processedLabels.count(lastLabel) != 1)) {
+ if ((m->anyLabelsToProcess(lookup[0]->getLabel(), userLabels, "") == true) && (processedLabels.count(lastLabel) != 1)) {
string saveLabel = lookup[0]->getLabel();
for (int i = 0; i < lookup.size(); i++) { delete lookup[i]; }
userLabels.erase(sabund->getLabel());
}
- if ((anyLabelsToProcess(sabund->getLabel(), userLabels, "") == true) && (processedLabels.count(lastLabel) != 1)) {
+ if ((m->anyLabelsToProcess(sabund->getLabel(), userLabels, "") == true) && (processedLabels.count(lastLabel) != 1)) {
string saveLabel = sabund->getLabel();
delete sabund;