5 * Created by Sarah Westcott on 1/5/09.
6 * Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved.
10 #include "validcommands.h"
12 /***********************************************************************/
14 ValidCommands::ValidCommands() {
17 commands["read.dist"] = "read.dist";
18 commands["read.otu"] = "read.otu";
19 commands["read.list"] = "read.list";
20 commands["cluster"] = "cluster";
21 commands["help"] = "help";
22 commands["quit"] = "quit";
23 commands["collect.single"] = "collect.single";
24 commands["collect.shared"] = "collect.shared";
25 commands["rarefaction.single"] = "rarefaction.single";
26 commands["rarefaction.shared"] = "rarefaction.shared";
27 commands["summary.single"] = "summary.single";
28 commands["summary.shared"] = "summary.shared";
32 cout << "Standard Error: " << e.what() << " has occurred in the ValidCommands class Function ValidCommands. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
36 cout << "An unknown error has occurred in the ValidCommands class function ValidCommands. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
41 /***********************************************************************/
43 ValidCommands::~ValidCommands() {}
45 /***********************************************************************/
46 bool ValidCommands::isValidCommand(string command) {
49 //is the command in the map
50 if ((commands.find(command)) != (commands.end())) {
53 cout << command << " is not a valid command in Mothur. Valid commands are read.dist(), read.list(), cluster(), collect.single(), collect.shared(), rarefaction.single(), rarefaction.shared(), summary.single(), summary.shared(), quit(), help()." << endl;
59 cout << "Standard Error: " << e.what() << " has occurred in the ValidCommands class Function isValidCommand. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
63 cout << "An unknown error has occurred in the ValidCommands class function isValidCommand. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
68 /***********************************************************************/