+ 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, "GetSharedOTUCommand", "setParameters");
+ exit(1);
+ }
+}
+//**********************************************************************************************************************
+string GetSharedOTUCommand::getHelpString(){
+ try {
+ string helpString = "";
+ helpString += "The get.sharedseqs command parameters are list, group, label, unique, shared, output and fasta. The list and group parameters are required, unless you have valid current files.\n";
+ helpString += "The label parameter allows you to select what distance levels you would like output files for, and are separated by dashes.\n";
+ helpString += "The unique and shared parameters allow you to select groups you would like to know the shared info for, and are separated by dashes.\n";
+ helpString += "If you enter your groups under the unique parameter mothur will return the otus that contain ONLY sequences from those groups.\n";
+ helpString += "If you enter your groups under the shared parameter mothur will return the otus that contain sequences from those groups and may also contain sequences from other groups.\n";
+ helpString += "If you do not enter any groups then the get.sharedseqs command will return sequences that are unique to all groups in your group file.\n";
+ helpString += "The fasta parameter allows you to input a fasta file and outputs a fasta file for each distance level containing only the sequences that are in OTUs shared by the groups specified.\n";
+ helpString += "The output parameter allows you to output the list of names without the group and bin number added. \n";
+ helpString += "With this option you can use the names file as an input in get.seqs and remove.seqs commands. To do this enter output=accnos. \n";
+ helpString += "The get.sharedseqs command outputs a .names file for each distance level containing a list of sequences in the OTUs shared by the groups specified.\n";
+ helpString += "The get.sharedseqs command should be in the following format: get.sharedseqs(list=yourListFile, group=yourGroupFile, label=yourLabels, unique=yourGroups, fasta=yourFastafile, output=yourOutput).\n";
+ helpString += "Example get.sharedseqs(list=amazon.fn.list, label=unique-0.01, group= amazon.groups, unique=forest-pasture, fasta=amazon.fasta, output=accnos).\n";
+ helpString += "The output to the screen is the distance and the number of otus at that distance for the groups you specified.\n";
+ helpString += "The default value for label is all labels in your inputfile. The default for groups is all groups in your file.\n";
+ helpString += "Note: No spaces between parameter labels (i.e. label), '=' and parameters (i.e.yourLabel).\n";
+ return helpString;
+ }
+ catch(exception& e) {
+ m->errorOut(e, "GetSharedOTUCommand", "getHelpString");
+ exit(1);
+ }
+}
+//**********************************************************************************************************************
+GetSharedOTUCommand::GetSharedOTUCommand(){
+ try {
+ abort = true; calledHelp = true;
+ setParameters();
+ vector<string> tempOutNames;
+ outputTypes["fasta"] = tempOutNames;
+ outputTypes["accnos"] = tempOutNames;
+ outputTypes["sharedseqs"] = tempOutNames;
+ }
+ catch(exception& e) {
+ m->errorOut(e, "GetSharedOTUCommand", "GetSharedOTUCommand");
+ exit(1);
+ }
+}
+//**********************************************************************************************************************
+GetSharedOTUCommand::GetSharedOTUCommand(string option) {