//**********************************************************************************************************************
vector<string> SetCurrentCommand::setParameters(){
try {
-
+
+ CommandParameter pprocessors("processors", "Number", "", "1", "", "", "",false,false); parameters.push_back(pprocessors);
+ CommandParameter pflow("flow", "InputTypes", "", "", "none", "none", "none",false,false); parameters.push_back(pflow);
CommandParameter pphylip("phylip", "InputTypes", "", "", "none", "none", "none",false,false); parameters.push_back(pphylip);
CommandParameter pcolumn("column", "InputTypes", "", "", "none", "none", "none",false,false); parameters.push_back(pcolumn);
CommandParameter pfasta("fasta", "InputTypes", "", "", "none", "none", "none",false,false); parameters.push_back(pfasta);
//allow user to run help
if(option == "help") { help(); abort = true; calledHelp = true; }
+ else if(option == "citation") { citation(); abort = true; calledHelp = true;}
else {
//valid paramters for this command
//if the user has not given a path then, add inputdir. else leave path alone.
if (path == "") { parameters["taxonomy"] = inputDir + it->second; }
}
+
+ it = parameters.find("flow");
+ //user has given a template file
+ if(it != parameters.end()){
+ path = m->hasPath(it->second);
+ //if the user has not given a path then, add inputdir. else leave path alone.
+ if (path == "") { parameters["flow"] = inputDir + it->second; }
+ }
}
//check for parameters
else if (taxonomyfile == "not found") { taxonomyfile = ""; }
if (taxonomyfile != "") { m->setTaxonomyFile(taxonomyfile); }
+ flowfile = validParameter.validFile(parameters, "flow", true);
+ if (flowfile == "not open") { m->mothurOut("Ignoring: " + parameters["flow"]); m->mothurOutEndLine(); flowfile = ""; }
+ else if (flowfile == "not found") { flowfile = ""; }
+ if (flowfile != "") { m->setFlowFile(flowfile); }
+
+ processors = validParameter.validFile(parameters, "processors", false);
+ if (processors == "not found") { processors = "1"; }
+ if (processors != "") { m->setProcessors(processors); }
+
clearTypes = validParameter.validFile(parameters, "clear", false);
if (clearTypes == "not found") { clearTypes = ""; }
else { m->splitAtDash(clearTypes, types); }
m->setAccnosFile("");
}else if (types[i] == "taxonomy") {
m->setTaxonomyFile("");
+ }else if (types[i] == "flow") {
+ m->setFlowFile("");
+ }else if (types[i] == "processors") {
+ m->setProcessors("1");
}else if (types[i] == "all") {
m->clearCurrentFiles();
}else {