- abort = false;
-
- //allow user to run help
- if(option == "help") { help(); abort = true; }
-
- else {
- //valid paramters for this command
- string Array[] = {"phylip"};
- vector<string> myArray (Array, Array+(sizeof(Array)/sizeof(string)));
-
- OptionParser parser(option);
- map<string, string> parameters = parser. getParameters();
-
- ValidParameters validParameter;
-
- //check to make sure all parameters are valid for command
- for (map<string, string>::iterator it = parameters.begin(); it != parameters.end(); it++) {
- if (validParameter.isValidParameter(it->first, myArray, it->second) != true) { abort = true; }
- }
-
- //required parameters
- phylipfile = validParameter.validFile(parameters, "phylip", true);
- if (phylipfile == "not open") { abort = true; }
- else if (phylipfile == "not found") { phylipfile = ""; abort = true; }
- else { filename = phylipfile; }
-
- //columnfile = validParameter.validFile(parameters, "column", true);
- //if (columnfile == "not open") { abort = true; }
- //else if (columnfile == "not found") { columnfile = ""; }
- //else { format = "column"; }
-
- //namefile = validParameter.validFile(parameters, "name", true);
- //if (namefile == "not open") { abort = true; }
- //else if (namefile == "not found") { namefile = ""; }
-
-
- //error checking on files
- if (phylipfile == "") { mothurOut("You must provide a distance file before running the pca command."); mothurOutEndLine(); abort = true; }
- //if ((phylipfile == "") && (columnfile == "")) { mothurOut("You must provide a distance file before running the pca command."); mothurOutEndLine(); abort = true; }
- //else if ((phylipfile != "") && (columnfile != "")) { mothurOut("You may not use both the column and the phylip parameters."); mothurOutEndLine(); abort = true; }
-
- //if (columnfile != "") {
- // if (namefile == "") { mothurOut("You need to provide a namefile if you are going to use the column format."); mothurOutEndLine(); abort = true; }
- //}
-
- //string temp = validParameter.validFile(parameters, "lt", false); if (temp == "not found") { temp = "false"; }
- //bool lt = isTrue(temp);
-
- //if (lt) { matrix = 2; }
- //else { matrix = 1; }
-
-
- }
-
+ CommandParameter pshared("shared", "InputTypes", "", "", "LRSS", "LRSS", "none",false,false); parameters.push_back(pshared);
+ CommandParameter prelabund("relabund", "InputTypes", "", "", "LRSS", "LRSS", "none",false,false); parameters.push_back(prelabund);
+ CommandParameter pgroups("groups", "String", "", "", "", "", "",false,false); parameters.push_back(pgroups);
+ CommandParameter pmetric("metric", "Boolean", "", "T", "", "", "",false,false); parameters.push_back(pmetric);
+ 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;