X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=getgroupscommand.cpp;h=e8f42dda532fab7f252de8c95e220c8eb27fa8f8;hb=8977d23b7f18d981b14e59c210c97198541ca7b0;hp=5021f4085534cfc84a17d5875e449cf90f9f1d53;hpb=65e21482d022d12f7a78a8d436fb51f322603e41;p=mothur.git diff --git a/getgroupscommand.cpp b/getgroupscommand.cpp index 5021f40..e8f42dd 100644 --- a/getgroupscommand.cpp +++ b/getgroupscommand.cpp @@ -189,6 +189,15 @@ GetGroupsCommand::GetGroupsCommand(string option) { else if (namefile == "not found") { namefile = ""; } else { m->setNameFile(namefile); } + groupfile = validParameter.validFile(parameters, "group", true); + if (groupfile == "not open") { abort = true; } + else if (groupfile == "not found") { + //if there is a current group file, use it + groupfile = m->getGroupFile(); + if (groupfile != "") { m->mothurOut("Using " + groupfile + " as input file for the group parameter."); m->mothurOutEndLine(); } + else { m->mothurOut("You have no current groupfile and the group parameter is required."); m->mothurOutEndLine(); abort = true; } + }else { m->setGroupFile(groupfile); } + listfile = validParameter.validFile(parameters, "list", true); if (listfile == "not open") { abort = true; } else if (listfile == "not found") { listfile = ""; }