try {
string helpString = "";
helpString += "The get.group command parameter is shared and it's required if you have no valid current file.\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");
helpString += "You may not use any parameters with the get.group command.\n";
helpString += "The get.group command should be in the following format: \n";
helpString += "get.group()\n";
exit(1);
}
}
+
//**********************************************************************************************************************
GetgroupCommand::GetgroupCommand(){
try {
abort = true; calledHelp = true;
setParameters();
- vector<string> tempOutNames;
- outputTypes["bootgroup"] = tempOutNames;
}
catch(exception& e) {
m->errorOut(e, "GetgroupCommand", "GetgroupCommand");
if (validParameter.isValidParameter(it->first, myArray, it->second) != true) { abort = true; }
}
- //initialize outputTypes
- vector<string> tempOutNames;
- outputTypes["bootgroup"] = tempOutNames;
-
//if the user changes the input directory command factory will send this info to us in the output parameter
string inputDir = validParameter.validFile(parameters, "inputdir", false);
if (inputDir == "not found"){ inputDir = ""; }
try {
if (abort == true) { if (calledHelp) { return 0; } return 2; }
-
- //open output file
- outputFile = outputDir + m->getRootName(m->getSimpleName(sharedfile)) + "bootGroups";
- m->openOutputFile(outputFile, out);
-
+
InputData input(sharedfile, "sharedfile");
vector<SharedRAbundVector*> lookup = input.getSharedRAbundVectors();
for (int i = 0; i < lookup.size(); i++) {
- out << lookup[i]->getGroup() << '\t' << lookup[i]->getGroup() << endl;
m->mothurOut(lookup[i]->getGroup()); m->mothurOutEndLine();
delete lookup[i];
}
-
- out.close();
-
- if (m->control_pressed) { m->mothurRemove(outputFile); return 0; }
-
+
m->mothurOutEndLine();
m->mothurOut("Output File Name: "); m->mothurOutEndLine();
- m->mothurOut(outputFile); m->mothurOutEndLine(); outputNames.push_back(outputFile); outputTypes["bootgroup"].push_back(outputFile);
m->mothurOutEndLine();
return 0;
exit(1);
}
}
+//**********************************************************************************************************************