5 * Created by Sarah Westcott on 1/5/09.
6 * Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved.
10 #include "validparameter.h"
12 /***********************************************************************/
14 ValidParameters::ValidParameters() {
17 parameters["phylip"] = "phylip";
18 parameters["column"] = "column";
19 parameters["list"] = "list";
20 parameters["rabund"] = "rabund";
21 parameters["sabund"] = "sabund";
22 parameters["shared"] = "shared";
23 parameters["name"] = "name";
24 parameters["group"] = "group";
25 parameters["order"] = "order";
26 parameters["fasta"] = "fasta";
27 parameters["tree"] = "tree";
28 parameters["fileroot"] = "fileroot";
29 parameters["cutoff"] = "cutoff";
30 parameters["method"] = "method";
31 parameters["format"] = "format";
32 parameters["precision"] = "precision";
33 parameters["label"] = "label";
34 parameters["line"] = "line";
35 parameters["iters"] = "iters";
36 parameters["jumble"] = "jumble";
37 parameters["freq"] = "freq";
38 parameters["abund"] = "abund";
39 parameters["random"] = "random";
40 parameters["groups"] = "groups";
41 parameters["calc"] = "calc";
45 cout << "Standard Error: " << e.what() << " has occurred in the ValidParameters class Function ValidParameters. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
49 cout << "An unknown error has occurred in the ValidParameters class function ValidParameters. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
54 /***********************************************************************/
56 ValidParameters::~ValidParameters() {}
58 /***********************************************************************/
59 bool ValidParameters::isValidParameter(string parameter) {
62 //is the parameter in the map
63 if ((parameters.find(parameter)) != (parameters.end())) {
66 cout << parameter << " is not a valid parameter in Mothur. Valid parameters are " << endl;
67 for (it = parameters.begin(); it != parameters.end(); it++) {
68 cout << it->first << ", ";
77 cout << "Standard Error: " << e.what() << " has occurred in the ValidParameters class Function isValidParameter. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
81 cout << "An unknown error has occurred in the ValidParameters class function isValidParameter. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
86 /***********************************************************************/