+ }
+ catch(exception& e) {
+ m->errorOut(e, "LibShuffCommand", "LibShuffCommand");
+ exit(1);
+ }
+}
+//**********************************************************************************************************************
+
+void LibShuffCommand::help(){
+ try {
+ m->mothurOut("The libshuff command can only be executed after a successful read.dist command including a groupfile.\n");
+ m->mothurOut("The libshuff command parameters are groups, iters, step, form and cutoff. No parameters are required.\n");
+ m->mothurOut("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");
+ m->mothurOut("The group names are separated by dashes. The iters parameter allows you to specify how many random matrices you would like compared to your matrix.\n");
+ m->mothurOut("The step parameter allows you to specify change in distance you would like between each output if you are using the discrete form.\n");
+ m->mothurOut("The form parameter allows you to specify if you would like to analyze your matrix using the discrete or integral form. Your options are integral or discrete.\n");
+ m->mothurOut("The libshuff command should be in the following format: libshuff(groups=yourGroups, iters=yourIters, cutOff=yourCutOff, form=yourForm, step=yourStep).\n");
+ m->mothurOut("Example libshuff(groups=A-B-C, iters=500, form=discrete, step=0.01, cutOff=2.0).\n");
+ m->mothurOut("The default value for groups is all the groups in your groupfile, iters is 10000, cutoff is 1.0, form is integral and step is 0.01.\n");
+ m->mothurOut("The libshuff command output two files: .coverage and .slsummary their descriptions are in the manual.\n");
+ m->mothurOut("Note: No spaces between parameter labels (i.e. iters), '=' and parameters (i.e.yourIters).\n\n");
+ }
+ catch(exception& e) {
+ m->errorOut(e, "LibShuffCommand", "help");
+ exit(1);
+ }
+}
+
+//**********************************************************************************************************************
+
+int LibShuffCommand::execute(){
+ try {
+
+ if (abort == true) { return 0; }
+
+ savedDXYValues = form->evaluateAll();
+ savedMinValues = form->getSavedMins();
+
+ if (m->control_pressed) { delete form; globaldata->Groups.clear(); delete globaldata->gMatrix; globaldata->gMatrix = NULL; return 0; }
+
+ pValueCounts.resize(numGroups);
+ for(int i=0;i<numGroups;i++){
+ pValueCounts[i].assign(numGroups, 0);
+ }
+
+ if (m->control_pressed) { outputTypes.clear(); delete form; globaldata->Groups.clear(); delete globaldata->gMatrix; globaldata->gMatrix = NULL; return 0; }