+ //if the user changes the output directory command factory will send this info to us in the output parameter
+ string outputDir = validParameter.validFile(parameters, "outputdir", false); if (outputDir == "not found"){ outputDir = ""; }
+
+ if ((globaldata->getSharedFile() == "")) { m->mothurOut("You must use the read.otu command to read a groupfile or a sharedfile before you can use the get.group command."); m->mothurOutEndLine(); abort = true; }
+
+ if (abort == false) {
+ //open shared file
+ sharedfile = globaldata->getSharedFile();
+ m->openInputFile(sharedfile, in);
+
+ //open output file
+ if (outputDir == "") { outputDir += m->hasPath(sharedfile); }
+ outputFile = outputDir + m->getRootName(m->getSimpleName(sharedfile)) + "bootGroups";
+ m->openOutputFile(outputFile, out);
+
+ }
+ }
+ }
+ catch(exception& e) {
+ m->errorOut(e, "GetgroupCommand", "GetgroupCommand");
+ exit(1);
+ }
+}
+//**********************************************************************************************************************
+
+void GetgroupCommand::help(){
+ try {
+ m->mothurOut("The get.group command can only be executed after a successful read.otu command.\n");
+ //m->mothurOut("The get.group command outputs a .bootGroups file to you can use in addition to the tree file generated by the bootstrap.shared command to run the consensus command.\n");
+ m->mothurOut("You may not use any parameters with the get.group command.\n");
+ m->mothurOut("The get.group command should be in the following format: \n");
+ m->mothurOut("get.group()\n");
+ m->mothurOut("Example get.group().\n");
+
+ }
+ catch(exception& e) {
+ m->errorOut(e, "GetgroupCommand", "help");
+ exit(1);
+ }