X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=phylotypecommand.cpp;h=1d6c391de69c83a86971873577a0df0b21efdbcd;hb=2bb9267aa4b4ecdf8488b06605cc9f3f36fa4332;hp=ef23375df9425f11816acbf8594f46e613e9e148;hpb=7bf9a81bba76538ecaf351ae208de3da4bf1b6dd;p=mothur.git diff --git a/phylotypecommand.cpp b/phylotypecommand.cpp index ef23375..1d6c391 100644 --- a/phylotypecommand.cpp +++ b/phylotypecommand.cpp @@ -128,11 +128,11 @@ PhylotypeCommand::PhylotypeCommand(string option) { 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(); m->setNameFile(namefile); } @@ -144,7 +144,7 @@ PhylotypeCommand::PhylotypeCommand(string option) { 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; } @@ -153,6 +153,11 @@ PhylotypeCommand::PhylotypeCommand(string option) { else { allLines = 1; } } + if (namefile == "") { + vector files; files.push_back(taxonomyFileName); + parser.getNameFile(files); + } + } } catch(exception& e) { @@ -215,7 +220,7 @@ int PhylotypeCommand::execute(){ 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; } @@ -286,7 +291,7 @@ int PhylotypeCommand::execute(){ 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; }