X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=validcommands.cpp;h=5549e6396527c198a5131ba85c42ee356c07774f;hb=ec453945974b5c72af0bea042e3517312566d592;hp=53ee7431b49fecc06002e5b9330259371bd35729;hpb=b2dca66a02f8f82aa5528e531eace60fbbd2967b;p=mothur.git diff --git a/validcommands.cpp b/validcommands.cpp index 53ee743..5549e63 100644 --- a/validcommands.cpp +++ b/validcommands.cpp @@ -17,19 +17,33 @@ ValidCommands::ValidCommands() { commands["read.dist"] = "read.dist"; commands["read.otu"] = "read.otu"; commands["read.tree"] = "read.tree"; + commands["read.seqs"] = "read.seqs"; + commands["bin.seqs"] = "bin.seqs"; + commands["get.oturep"] = "get.oturep"; commands["cluster"] = "cluster"; commands["deconvolute"] = "deconvolute"; - commands["parsimony"] = "parsimony"; - commands["help"] = "help"; - commands["quit"] = "quit"; + commands["dist.seqs"] = "dist.seqs"; commands["collect.single"] = "collect.single"; commands["collect.shared"] = "collect.shared"; commands["rarefaction.single"] = "rarefaction.single"; commands["rarefaction.shared"] = "rarefaction.shared"; commands["summary.single"] = "summary.single"; commands["summary.shared"] = "summary.shared"; + commands["parsimony"] = "parsimony"; commands["unifrac.weighted"] = "unifrac.weighted"; commands["unifrac.unweighted"] = "unifrac.unweighted"; + commands["libshuff"] = "libshuff"; + commands["tree.shared"] = "tree.shared"; + commands["heatmap"] = "heatmap"; + commands["venn"] = "venn"; + commands["get.group"] = "get.group"; + commands["get.label"] = "get.label"; + commands["get.line"] = "get.line"; + commands["bootstrap.shared"] = "bootstrap.shared"; + commands["concensus"] = "concensus"; + commands["help"] = "help"; + commands["filter.seqs"] = "filter.seqs"; + commands["quit"] = "quit"; } @@ -55,7 +69,11 @@ bool ValidCommands::isValidCommand(string command) { if ((commands.find(command)) != (commands.end())) { return true; }else{ - cout << command << " is not a valid command in Mothur. Valid commands are read.dist(), read.otu(), read.tree(), cluster(), deconvolute(), collect.single(), collect.shared(), rarefaction.single(), rarefaction.shared(), summary.single(), summary.shared(), parsimony(), unifrac.weighted(), unifrac.unweighted(), quit(), help()." << endl; + cout << command << " is not a valid command in Mothur. Valid commands are "; + for (it = commands.begin(); it != commands.end(); it++) { + cout << it->first << ", "; + } + cout << endl; return false; } @@ -71,3 +89,24 @@ bool ValidCommands::isValidCommand(string command) { } /***********************************************************************/ +void ValidCommands::printCommands(ostream& out) { + try { + out << "Valid commands are "; + for (it = commands.begin(); it != commands.end(); it++) { + out << it->first << ", "; + } + out << endl; + } + catch(exception& e) { + cout << "Standard Error: " << e.what() << " has occurred in the ValidCommands class Function printCommands. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + exit(1); + } + catch(...) { + cout << "An unknown error has occurred in the ValidCommands class function printCommands. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + exit(1); + } +} + + + +