X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=getoturepcommand.cpp;h=d476cc3499844c88014bcef9e1a005459fab3dda;hp=dbd19a8bfc7d5a266b131e74b18f3f2980c40aba;hb=d1c97b8c04bb75faca1e76ffad60b37a4d789d3d;hpb=af0a94ea8f02421b2b73e77e68753a2b4c37768e diff --git a/getoturepcommand.cpp b/getoturepcommand.cpp index dbd19a8..d476cc3 100644 --- a/getoturepcommand.cpp +++ b/getoturepcommand.cpp @@ -265,7 +265,11 @@ GetOTURepCommand::GetOTURepCommand(string option) { if (ct.hasGroupInfo()) { hasGroups = true; } } - + groupfile = validParameter.validFile(parameters, "group", true); + if (groupfile == "not open") { groupfile = ""; abort = true; } + else if (groupfile == "not found") { groupfile = ""; } + else { m->setGroupFile(groupfile); } + method = validParameter.validFile(parameters, "method", false); if (method == "not found"){ method = "distance"; } if ((method != "distance") && (method != "abundance")) { m->mothurOut(method + " is not a valid option for the method parameter. The only options are: distance and abundance, aborting."); m->mothurOutEndLine(); abort = true; @@ -337,11 +341,7 @@ GetOTURepCommand::GetOTURepCommand(string option) { else { allLines = 1; } } - groupfile = validParameter.validFile(parameters, "group", true); - if (groupfile == "not open") { groupfile = ""; abort = true; } - else if (groupfile == "not found") { groupfile = ""; } - else { m->setGroupFile(groupfile); } - + sorted = validParameter.validFile(parameters, "sorted", false); if (sorted == "not found"){ sorted = ""; } if (sorted == "none") { sorted=""; } if ((sorted != "") && (sorted != "name") && (sorted != "bin") && (sorted != "size") && (sorted != "group")) {