helpString += "Example unifrac.weighted(groups=A-B-C, iters=500).\n";
helpString += "The default value for groups is all the groups in your groupfile, and iters is 1000.\n";
helpString += "The unifrac.weighted command output two files: .weighted and .wsummary their descriptions are in the manual.\n";
- helpString += "Note: No spaces between parameter labels (i.e. groups), '=' and parameters (i.e.yourGroups).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. groups), '=' and parameters (i.e.yourGroups).\n";
return helpString;
}
catch(exception& e) {
//allow user to run help
if(option == "help") { help(); abort = true; calledHelp = true; }
+ else if(option == "citation") { citation(); abort = true; calledHelp = true;}
else {
vector<string> myArray = setParameters();
}
m->runParse = true;
+ m->Groups.clear();
+ m->namesOfGroups.clear();
+ m->Treenames.clear();
+ m->names.clear();
//check for required parameters
treefile = validParameter.validFile(parameters, "tree", true);
treefile = m->getTreeFile();
if (treefile != "") { m->mothurOut("Using " + treefile + " as input file for the tree parameter."); m->mothurOutEndLine(); }
else { m->mothurOut("You have no current tree file and the tree parameter is required."); m->mothurOutEndLine(); abort = true; }
- }
+ }else { m->setTreeFile(treefile); }
//check for required parameters
groupfile = validParameter.validFile(parameters, "group", true);
if (groupfile == "not open") { abort = true; }
else if (groupfile == "not found") { groupfile = ""; }
+ else { m->setGroupFile(groupfile); }
namefile = validParameter.validFile(parameters, "name", true);
if (namefile == "not open") { abort = true; }
else if (namefile == "not found") { namefile = ""; }
+ else { m->setNameFile(namefile); }
outputDir = validParameter.validFile(parameters, "outputdir", false); if (outputDir == "not found"){ outputDir = ""; }
if (abort == true) { if (calledHelp) { return 0; } return 2; }
+ m->setTreeFile(treefile);
+
if (groupfile != "") {
//read in group map info.
tmap = new TreeMap(groupfile);