X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=parsimonycommand.cpp;h=2d46efc9efebcfbe7807292cb814cf58686f9ac4;hb=2bb9267aa4b4ecdf8488b06605cc9f3f36fa4332;hp=ccf29526f5e803049371c452bcdcf7ddad10da48;hpb=0ca63a8165baa0afa459e644ebe140ba496d5ba0;p=mothur.git diff --git a/parsimonycommand.cpp b/parsimonycommand.cpp index ccf2952..2d46efc 100644 --- a/parsimonycommand.cpp +++ b/parsimonycommand.cpp @@ -139,7 +139,7 @@ ParsimonyCommand::ParsimonyCommand(string option) { if (randomtree == "") { //check for required parameters treefile = validParameter.validFile(parameters, "tree", true); - if (treefile == "not open") { abort = true; } + if (treefile == "not open") { treefile = ""; abort = true; } else if (treefile == "not found") { //if there is a current design file, use it treefile = m->getTreeFile(); if (treefile != "") { m->mothurOut("Using " + treefile + " as input file for the tree parameter."); m->mothurOutEndLine(); } @@ -153,7 +153,7 @@ ParsimonyCommand::ParsimonyCommand(string option) { else { m->setGroupFile(groupfile); } 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 { m->setNameFile(namefile); } } @@ -177,6 +177,11 @@ ParsimonyCommand::ParsimonyCommand(string option) { m->setProcessors(temp); m->mothurConvert(temp, processors); + if (namefile == "") { + vector files; files.push_back(treefile); + parser.getNameFile(files); + } + } }