+vector<string> GetRelAbundCommand::setParameters(){
+ try {
+ CommandParameter pshared("shared", "InputTypes", "", "", "none", "none", "none",false,true); parameters.push_back(pshared);
+ CommandParameter pgroups("groups", "String", "", "", "", "", "",false,false); parameters.push_back(pgroups);
+ CommandParameter pscale("scale", "Multiple", "totalgroup-totalotu-averagegroup-averageotu", "totalgroup", "", "", "",false,false); parameters.push_back(pscale);
+ CommandParameter plabel("label", "String", "", "", "", "", "",false,false); parameters.push_back(plabel);
+ CommandParameter pinputdir("inputdir", "String", "", "", "", "", "",false,false); parameters.push_back(pinputdir);
+ CommandParameter poutputdir("outputdir", "String", "", "", "", "", "",false,false); parameters.push_back(poutputdir);
+
+ vector<string> myArray;
+ for (int i = 0; i < parameters.size(); i++) { myArray.push_back(parameters[i].name); }
+ return myArray;
+ }
+ catch(exception& e) {
+ m->errorOut(e, "GetRelAbundCommand", "setParameters");
+ exit(1);
+ }
+}
+//**********************************************************************************************************************
+string GetRelAbundCommand::getHelpString(){
+ try {
+ string helpString = "";
+ helpString += "The get.relabund command parameters are shared, groups, scale and label. shared is required, unless you have a valid current file.\n";
+ helpString += "The groups parameter allows you to specify which of the groups in your groupfile you would like included. The group names are separated by dashes.\n";
+ helpString += "The label parameter allows you to select what distance levels you would like, and are also separated by dashes.\n";
+ helpString += "The scale parameter allows you to select what scale you would like to use. Choices are totalgroup, totalotu, averagegroup, averageotu, default is totalgroup.\n";
+ helpString += "The get.relabund command should be in the following format: get.relabund(groups=yourGroups, label=yourLabels).\n";
+ helpString += "Example get.relabund(groups=A-B-C, scale=averagegroup).\n";
+ helpString += "The default value for groups is all the groups in your groupfile, and all labels in your inputfile will be used.\n";
+ helpString += "The get.relabund command outputs a .relabund file.\n";
+ helpString += "Note: No spaces between parameter labels (i.e. groups), '=' and parameters (i.e.yourGroups).\n";
+ return helpString;
+ }
+ catch(exception& e) {
+ m->errorOut(e, "GetRelAbundCommand", "getHelpString");
+ exit(1);
+ }
+}
+//**********************************************************************************************************************
+GetRelAbundCommand::GetRelAbundCommand(){
+ try {
+ abort = true; calledHelp = true;
+ setParameters();
+ vector<string> tempOutNames;
+ outputTypes["relabund"] = tempOutNames;
+ }
+ catch(exception& e) {
+ m->errorOut(e, "GetRelAbundCommand", "GetRelAbundCommand");
+ exit(1);
+ }
+}
+//**********************************************************************************************************************