]> git.donarmstrong.com Git - mothur.git/blobdiff - commandfactory.cpp
added create.database command. fixed help in get.sharedseqs. added new constructor...
[mothur.git] / commandfactory.cpp
index bdcfbbab528a785abce1330a3bb6b19d8212fdd6..b61c2d2dc820c7cf05b7f82d3983017f2d6d4c55 100644 (file)
 #include "sortseqscommand.h"
 #include "classifytreecommand.h"
 #include "cooccurrencecommand.h"
+#include "pcrseqscommand.h"
+#include "createdatabasecommand.h"
 
 /*******************************************************/
 
@@ -281,6 +283,8 @@ CommandFactory::CommandFactory(){
     commands["sort.seqs"]           = "sort.seqs";
     commands["classify.tree"]       = "classify.tree";
     commands["cooccurrence"]        = "cooccurrence";
+    commands["pcr.seqs"]            = "pcr.seqs";
+    commands["create.database"]     = "create.database";
        commands["quit"]                                = "MPIEnabled"; 
 
 }
@@ -311,6 +315,7 @@ CommandFactory::~CommandFactory(){
 //This function calls the appropriate command fucntions based on user input.
 Command* CommandFactory::getCommand(string commandName, string optionString){
        try {
+        
                delete command;   //delete the old command
                
                //user has opted to redirect output from dir where input files are located to some other place
@@ -445,6 +450,8 @@ Command* CommandFactory::getCommand(string commandName, string optionString){
         else if(commandName == "sort.seqs")             {      command = new SortSeqsCommand(optionString);                }
         else if(commandName == "classify.tree")         {      command = new ClassifyTreeCommand(optionString);            }
         else if(commandName == "cooccurrence")          {      command = new CooccurrenceCommand(optionString);            }
+        else if(commandName == "pcr.seqs")              {      command = new PcrSeqsCommand(optionString);                 }
+        else if(commandName == "create.database")       {      command = new CreateDatabaseCommand(optionString);          }
                else                                                                                    {       command = new NoCommand(optionString);                                          }
 
                return command;
@@ -593,6 +600,8 @@ Command* CommandFactory::getCommand(string commandName, string optionString, str
         else if(commandName == "sort.seqs")             {      pipecommand = new SortSeqsCommand(optionString);                }
         else if(commandName == "classify.tree")         {      pipecommand = new ClassifyTreeCommand(optionString);            }
         else if(commandName == "cooccurrence")          {      pipecommand = new CooccurrenceCommand(optionString);            }
+        else if(commandName == "pcr.seqs")              {      pipecommand = new PcrSeqsCommand(optionString);                 }
+        else if(commandName == "create.database")       {      pipecommand = new CreateDatabaseCommand(optionString);          }
                else                                                                                    {       pipecommand = new NoCommand(optionString);                                              }
 
                return pipecommand;
@@ -729,6 +738,8 @@ Command* CommandFactory::getCommand(string commandName){
         else if(commandName == "sort.seqs")             {      shellcommand = new SortSeqsCommand();               }
         else if(commandName == "classify.tree")         {      shellcommand = new ClassifyTreeCommand();           }
         else if(commandName == "cooccurrence")          {      shellcommand = new CooccurrenceCommand();           }
+        else if(commandName == "pcr.seqs")              {      shellcommand = new PcrSeqsCommand();                }
+        else if(commandName == "create.database")       {      shellcommand = new CreateDatabaseCommand();         }
                else                                                                                    {       shellcommand = new NoCommand();                                         }
 
                return shellcommand;