string ClassifyOtuCommand::getHelpString(){
try {
string helpString = "";
- helpString += "The classify.otu command parameters are list, taxonomy, reftaxonomy, name, group, count, cutoff, label, basis and probs. The taxonomy and list parameters are required unless you have a valid current file.\n";
+ helpString += "The classify.otu command parameters are list, taxonomy, reftaxonomy, name, group, count, persample, cutoff, label, basis and probs. The taxonomy and list parameters are required unless you have a valid current file.\n";
helpString += "The reftaxonomy parameter allows you give the name of the reference taxonomy file used when you classified your sequences. Providing it will keep the rankIDs in the summary file static.\n";
helpString += "The name parameter allows you add a names file with your taxonomy file.\n";
helpString += "The group parameter allows you provide a group file to use in creating the summary file breakdown.\n";
helpString += "Now for basis=otu could give Clostridiales 3 7 6 1 2, where 7 is the number of otus that classified to Clostridiales.\n";
helpString += "6 is the number of otus containing sequences from groupA, 1 is the number of otus containing sequences from groupB, and 2 is the number of otus containing sequences from groupC.\n";
helpString += "The label parameter allows you to select what distance levels you would like a output files created for, and is separated by dashes.\n";
+ helpString += "The persample parameter allows you to find a consensus taxonomy for each group. Default=f\n";
helpString += "The default value for label is all labels in your inputfile.\n";
helpString += "The cutoff parameter allows you to specify a consensus confidence threshold for your taxonomy. The default is 51, meaning 51%. Cutoff cannot be below 51.\n";
helpString += "The probs parameter shuts off the outputting of the consensus confidence results. The default is true, meaning you want the confidence to be shown.\n";
//find pattern to use based on number of variables passed in
string pattern = "";
bool foundPattern = false;
+ vector<int> numVariablesPerPattern;
for (int i = 0; i < patterns.size(); i++) {
int numVariables = 0;
for (int j = 0; j < patterns[i].length(); j++) { if (patterns[i][j] == '[') { numVariables++; } }
+ numVariablesPerPattern.push_back(numVariables);
if (numVariables == variableParts.size()) { pattern = patterns[i]; foundPattern = true; break; }
}
- if (!foundPattern) { m->mothurOut("[ERROR]: Not enough variable pieces for " + type + ".\n"); m->control_pressed = true; }
+ //if you didn't find an exact match do we have something that might work
+ if (!foundPattern) {
+ for (int i = 0; i < numVariablesPerPattern.size(); i++) {
+ if (numVariablesPerPattern[i] < variableParts.size()) { pattern = patterns[i]; foundPattern = true; break; }
+ }
+ if (!foundPattern) { m->mothurOut("[ERROR]: Not enough variable pieces for " + type + ".\n"); m->control_pressed = true; }
+ }
if (pattern != "") {
int numVariables = 0;
for (int i = 0; i < m->Treenames.size(); i++) {
nameMap.insert(m->Treenames[i]);
//sanity check - is this a group that is not in the sharedfile?
+ if (i == 0) { gps.insert("Group1"); }
if (designfile == "") {
- if (i == 0) { gps.insert("Group1"); }
if (!(m->inUsersGroups(m->Treenames[i], m->getAllGroups()))) {
m->mothurOut("[ERROR]: " + m->Treenames[i] + " is not a group in your shared or relabund file."); m->mothurOutEndLine();
mismatch = true;
outAve.close();
variables["[tag2]"] = "std";
- distFileName = outputDir + getOutputFileName("phylip",variables);
+ distFileName = getOutputFileName("phylip",variables);
outputNames.push_back(distFileName); outputTypes["phylip"].push_back(distFileName);
ofstream outSTD;
m->openOutputFile(distFileName, outSTD);
int cutoff;
map<string, string> namemap;
vector<string> outputNames;
- map<string, vector<string> > outputTypes;
map<int, int> currentNodes;
map<int, int> parentNodes;
map<string, int>::iterator itSize;
// map<string, bool> active; //maps sequence name to whether it has already been merged or not.
vector<string> outputNames;
- map<string, vector<string> > outputTypes;
int readFASTA();
void readNameFile();
string VennCommand::getHelpString(){
try {
string helpString = "";
- helpString += "The venn command parameters are list, shared, groups, calc, abund, nseqs, permute, fontsize and label. shared, relabund, list, rabund or sabund is required unless you have a valid current file.\n";
+ helpString += "The venn command parameters are list, shared, groups, calc, abund, nseqs, permute, sharedotus, fontsize and label. shared, relabund, list, rabund or sabund is required unless you have a valid current file.\n";
helpString += "The groups parameter allows you to specify which of the groups in your groupfile you would like included in your venn diagram, you may only use a maximum of 4 groups.\n";
helpString += "The group names are separated by dashes. The label allows you to select what distance levels you would like a venn diagram created for, and are also separated by dashes.\n";
helpString += "The fontsize parameter allows you to adjust the font size of the picture created, default=24.\n";
helpString += "The nseqs parameter will output the number of sequences represented by the otus in the picture, default=F.\n";
helpString += "If you have more than 4 groups, the permute parameter will find all possible combos of 4 of your groups and create pictures for them, default=F.\n";
helpString += "The only estimators available four 4 groups are sharedsobs and sharedchao.\n";
+ helpString += "The sharedotus parameter can be used with the sharedsobs calculator to get the names of the OTUs in each section of the venn diagram. Default=t.\n";
helpString += "The venn command outputs a .svg file for each calculator you specify at each distance you choose.\n";
helpString += "Note: No spaces between parameter labels (i.e. groups), '=' and parameters (i.e.yourGroups).\n";
return helpString;