m->mothurOut("No valid current files. taxonomy is a required parameter."); m->mothurOutEndLine();
abort = true;
}
- }else if (taxonomyFileName == "not open") { abort = true; }
+ }else if (taxonomyFileName == "not open") { taxonomyFileName = ""; abort = true; }
+ else { m->setTaxonomyFile(taxonomyFileName); }
namefile = validParameter.validFile(parameters, "name", true);
- if (namefile == "not open") { abort = true; }
+ if (namefile == "not open") { namefile = ""; abort = true; }
else if (namefile == "not found") { namefile = ""; }
- else { readNamesFile(); }
+ else { readNamesFile(); m->setNameFile(namefile); }
//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"){
string temp = validParameter.validFile(parameters, "cutoff", false);
if (temp == "not found") { temp = "-1"; }
- convert(temp, cutoff);
+ m->mothurConvert(temp, cutoff);
label = validParameter.validFile(parameters, "label", false);
if (label == "not found") { label = ""; allLines = 1; }
else { allLines = 1; }
}
+ if (namefile == "") {
+ vector<string> files; files.push_back(taxonomyFileName);
+ parser.getNameFile(files);
+ }
+
}
}
catch(exception& e) {
if (m->control_pressed) {
outRabund.close(); outSabund.close(); outList.close();
- for (int i = 0; i < outputNames.size(); i++) { remove(outputNames[i].c_str()); }
+ for (int i = 0; i < outputNames.size(); i++) { m->mothurRemove(outputNames[i]); }
delete tree; return 0;
}
delete tree;
if (m->control_pressed) {
- for (int i = 0; i < outputNames.size(); i++) { remove(outputNames[i].c_str()); }
+ for (int i = 0; i < outputNames.size(); i++) { m->mothurRemove(outputNames[i]); }
return 0;
}