+ string helpString = "";
+ ValidCalculators validCalculator;
+ helpString += "The collect.shared command parameters are shared, label, freq, calc and groups. shared is required if there is no current sharedfile. \n";
+ helpString += "The collect.shared command should be in the following format: \n";
+ helpString += "collect.shared(label=yourLabel, freq=yourFreq, calc=yourEstimators, groups=yourGroups).\n";
+ helpString += "Example collect.shared(label=unique-.01-.03, freq=10, groups=B-C, calc=sharedchao-sharedace-jabund-sorensonabund-jclass-sorclass-jest-sorest-thetayc-thetan).\n";
+ helpString += "The default values for freq is 100 and calc are sharedsobs-sharedchao-sharedace-jabund-sorensonabund-jclass-sorclass-jest-sorest-thetayc-thetan.\n";
+ helpString += "The default value for groups is all the groups in your groupfile.\n";
+ helpString += "The freq parameter is used indicate when to output your data, by default it is set to 100. But you can set it to a percentage of the number of sequence. For example freq=0.10, means 10%. \n";
+ helpString += validCalculator.printCalc("shared");
+ helpString += "The label parameter is used to analyze specific labels in your input.\n";
+ helpString += "The all parameter is used to specify if you want the estimate of all your groups together. This estimate can only be made for sharedsobs and sharedchao calculators. The default is false.\n";
+ helpString += "If you use sharedchao and run into memory issues, set all to false. \n";
+ helpString += "The groups parameter allows you to specify which of the groups in your groupfile you would like analyzed. You must enter at least 2 valid groups.\n";
+ helpString += "Note: No spaces between parameter labels (i.e. list), '=' and parameters (i.e.yourListfile).\n";
+ return helpString;
+ }
+ catch(exception& e) {
+ m->errorOut(e, "CollectSharedCommand", "getHelpString");
+ exit(1);
+ }
+}
+//**********************************************************************************************************************
+CollectSharedCommand::CollectSharedCommand(){
+ try {
+ abort = true; calledHelp = true;
+ setParameters();
+ vector<string> tempOutNames;
+ outputTypes["sharedchao"] = tempOutNames;
+ outputTypes["sharedsobs"] = tempOutNames;
+ outputTypes["sharedace"] = tempOutNames;
+ outputTypes["jabund"] = tempOutNames;
+ outputTypes["sorabund"] = tempOutNames;
+ outputTypes["jclass"] = tempOutNames;
+ outputTypes["sorclass"] = tempOutNames;
+ outputTypes["jest"] = tempOutNames;
+ outputTypes["sorest"] = tempOutNames;
+ outputTypes["thetayc"] = tempOutNames;
+ outputTypes["thetan"] = tempOutNames;
+ outputTypes["kstest"] = tempOutNames;
+ outputTypes["whittaker"] = tempOutNames;
+ outputTypes["sharednseqs"] = tempOutNames;
+ outputTypes["ochiai"] = tempOutNames;
+ outputTypes["anderberg"] = tempOutNames;
+ outputTypes["kulczynski"] = tempOutNames;
+ outputTypes["kulczynskicody"] = tempOutNames;
+ outputTypes["lennon"] = tempOutNames;
+ outputTypes["morisitahorn"] = tempOutNames;
+ outputTypes["braycurtis"] = tempOutNames;
+ outputTypes["odum"] = tempOutNames;
+ outputTypes["canberra"] = tempOutNames;
+ outputTypes["structeuclidean"] = tempOutNames;
+ outputTypes["structchord"] = tempOutNames;
+ outputTypes["hellinger"] = tempOutNames;
+ outputTypes["manhattan"] = tempOutNames;
+ outputTypes["structpearson"] = tempOutNames;
+ outputTypes["soergel"] = tempOutNames;
+ outputTypes["spearman"] = tempOutNames;
+ outputTypes["structkulczynski"] = tempOutNames;
+ outputTypes["structchi2"] = tempOutNames;
+ outputTypes["speciesprofile"] = tempOutNames;
+ outputTypes["hamming"] = tempOutNames;
+ outputTypes["gower"] = tempOutNames;
+ outputTypes["memchi2"] = tempOutNames;
+ outputTypes["memchord"] = tempOutNames;
+ outputTypes["memeuclidean"] = tempOutNames;
+ outputTypes["mempearson"] = tempOutNames;
+
+ }
+ catch(exception& e) {
+ m->errorOut(e, "CollectSharedCommand", "CollectSharedCommand");
+ exit(1);
+ }
+}
+//**********************************************************************************************************************
+CollectSharedCommand::CollectSharedCommand(string option) {
+ try {
+ abort = false; calledHelp = false;