]> git.donarmstrong.com Git - mothur.git/blobdiff - validcommands.cpp
modified bin.seqs and get.oturep commands to include use of a groupfile if provided...
[mothur.git] / validcommands.cpp
index 3a72a2ba3eb64c6c23a5ae7ebdf7b4b4a5cd8ad7..7f7acc2e61044c7ef8f2e8948a112dfd3184cfaf 100644 (file)
@@ -16,17 +16,37 @@ ValidCommands::ValidCommands() {
        
                commands["read.dist"]                   = "read.dist"; 
                commands["read.otu"]                    = "read.otu";
-       //      commands["read.tree"]                   = "read.tree"; 
+               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["help"]                                = "help"; 
-               commands["quit"]                                = "quit"; 
+               commands["dist.seqs"]                   = "dist.seqs";
+               commands["dist.shared"]                 = "dist.shared";  //matrix output
                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["align.seqs"]                  = "align.seqs";
+               commands["quit"]                                = "quit"; 
+
                                
        }
        catch(exception& e) {
@@ -51,7 +71,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;
                }
                
@@ -66,4 +90,25 @@ bool ValidCommands::isValidCommand(string command) {
        }
 }
 
-/***********************************************************************/
\ No newline at end of file
+/***********************************************************************/
+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);
+       }
+}
+
+
+
+