X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=removegroupscommand.cpp;fp=removegroupscommand.cpp;h=725efafebce46296da2d9fd60a367ddc44d18fc2;hp=81722dd3e4047fc2505d64372a2ca539978c9445;hb=8977d23b7f18d981b14e59c210c97198541ca7b0;hpb=65e21482d022d12f7a78a8d436fb51f322603e41 diff --git a/removegroupscommand.cpp b/removegroupscommand.cpp index 81722dd..725efaf 100644 --- a/removegroupscommand.cpp +++ b/removegroupscommand.cpp @@ -190,6 +190,15 @@ RemoveGroupsCommand::RemoveGroupsCommand(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") { listfile = ""; abort = true; } else if (listfile == "not found") { listfile = ""; }