X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=unifracweightedcommand.cpp;h=f9dc450444b242555710f91dc3567f96e69e6d3d;hb=a8b8361418a0ed64878430f928099298aa018503;hp=b007db1f6eddc2d8e6119add616803b1d58526a2;hpb=0ca63a8165baa0afa459e644ebe140ba496d5ba0;p=mothur.git diff --git a/unifracweightedcommand.cpp b/unifracweightedcommand.cpp index b007db1..f9dc450 100644 --- a/unifracweightedcommand.cpp +++ b/unifracweightedcommand.cpp @@ -141,7 +141,7 @@ UnifracWeightedCommand::UnifracWeightedCommand(string option) { //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(); } @@ -155,7 +155,7 @@ UnifracWeightedCommand::UnifracWeightedCommand(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); } @@ -192,6 +192,11 @@ UnifracWeightedCommand::UnifracWeightedCommand(string option) { m->mothurConvert(temp, processors); if (!random) { iters = 0; } //turn off random calcs + + if (namefile == "") { + vector files; files.push_back(treefile); + parser.getNameFile(files); + } }