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.phylip"] = "read.phylip";
18 commands["read.column"] = "read.column";
19 commands["read.list"] = "read.list";
20 commands["read.rabund"] = "read.rabund";
21 commands["read.sabund"] = "read.sabund";
22 commands["read.shared"] = "read.shared";
23 commands["cluster"] = "cluster";
24 commands["help"] = "help";
25 commands["quit"] = "quit";
26 commands["collect.single"] = "collect.single";
27 commands["shared"] = "shared";
28 commands["collect.shared"] = "collect.shared";
29 commands["rarefaction.single"] = "rarefaction.single";
30 commands["rarefaction.shared"] = "rarefaction.shared";
31 commands["summary.single"] = "summary.single";
32 commands["summary.shared"] = "summary.shared";
33 commands["parselist"] = "parselist";
37 cout << "Standard Error: " << e.what() << " has occurred in the ValidCommands class Function ValidCommands. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
41 cout << "An unknown error has occurred in the ValidCommands class function ValidCommands. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
46 /***********************************************************************/
48 ValidCommands::~ValidCommands() {}
50 /***********************************************************************/
51 bool ValidCommands::isValidCommand(string command) {
54 //is the command in the map
55 if ((commands.find(command)) != (commands.end())) {
58 cout << command << " is not a valid command in Mothur. Valid commands are read.phylip(), read.column(), read.list(), read.rabund(), read.sabund(), read.shared(), cluster(), collect.single(), collect.shared(), parselist(), shared(), rarefaction.single(), rarefaction.shared(), summary.single(), summary.shared(), quit(), help()." << endl;
64 cout << "Standard Error: " << e.what() << " has occurred in the ValidCommands class Function isValidCommand. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
68 cout << "An unknown error has occurred in the ValidCommands class function isValidCommand. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
73 /***********************************************************************/