X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=validcommands.cpp;h=fed10caf2f62808bc0747a272dcf818989c5fb38;hb=d0939d3ab83988cc068f9ebe60596cf5decb65e5;hp=734e0ce697a5dff86261ef2451d2fbcdd323b0a0;hpb=58cf1d08fee8c64334979075fa57bcafb035a2ed;p=mothur.git diff --git a/validcommands.cpp b/validcommands.cpp index 734e0ce..fed10ca 100644 --- a/validcommands.cpp +++ b/validcommands.cpp @@ -16,17 +16,29 @@ ValidCommands::ValidCommands() { commands["read.dist"] = "read.dist"; commands["read.otu"] = "read.otu"; - // commands["read.tree"] = "read.tree"; + commands["read.tree"] = "read.tree"; + commands["bin.seqs"] = "bin.seqs"; + commands["get.oturep"] = "get.oturep"; commands["cluster"] = "cluster"; commands["deconvolute"] = "deconvolute"; - commands["help"] = "help"; - commands["quit"] = "quit"; 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["heatmap"] = "heatmap"; + commands["venn"] = "venn"; + commands["get.group"] = "get.group"; + commands["get.label"] = "get.label"; + commands["get.line"] = "get.line"; + commands["help"] = "help"; + commands["quit"] = "quit"; + } catch(exception& e) { @@ -51,7 +63,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(), cluster(), collect.single(), collect.shared(), rarefaction.single(), rarefaction.shared(), summary.single(), summary.shared(), 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; } @@ -67,3 +83,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); + } +} + + + +