]> git.donarmstrong.com Git - mothur.git/blobdiff - commandfactory.cpp
added summary.tax command and fixed bug with root level totals in tax.summary file
[mothur.git] / commandfactory.cpp
index 71558a9292280dcc9f28acb29b2944fb62a05eb6..b8261670c44d35b4bcc04a01db993d12fd653823 100644 (file)
 #include "sharedcommand.h"
 #include "getcommandinfocommand.h"
 #include "deuniquetreecommand.h"
+#include "countseqscommand.h"
+#include "countgroupscommand.h"
+#include "clearmemorycommand.h"
+#include "summarytaxcommand.h"
 
 /*******************************************************/
 
@@ -241,6 +245,9 @@ CommandFactory::CommandFactory(){
        commands["set.current"]                 = "set.current";
        commands["get.commandinfo"]             = "get.commandinfo";
        commands["deunique.tree"]               = "deunique.tree";
+       commands["count.seqs"]                  = "count.seqs";
+       commands["count.groups"]                = "count.groups";
+       commands["clear.memory"]                = "clear.memory";
        commands["pairwise.seqs"]               = "MPIEnabled";
        commands["pipeline.pds"]                = "MPIEnabled";
        commands["classify.seqs"]               = "MPIEnabled"; 
@@ -250,7 +257,7 @@ CommandFactory::CommandFactory(){
        commands["chimera.ccode"]               = "MPIEnabled";
        commands["chimera.check"]               = "MPIEnabled";
        commands["chimera.slayer"]              = "MPIEnabled";
-       commands["chimera.uchime"]              = "MPIEnabled";
+       commands["chimera.uchime"]              = "chimera.uchime";
        commands["chimera.pintail"]             = "MPIEnabled";
        commands["chimera.bellerophon"] = "MPIEnabled";
        commands["screen.seqs"]                 = "MPIEnabled";
@@ -259,6 +266,7 @@ CommandFactory::CommandFactory(){
        commands["shhh.seqs"]                   = "MPIEnabled";
        commands["sens.spec"]                   = "sens.spec";
        commands["seq.error"]                   = "seq.error";
+       commands["seq.error"]                   = "summary.tax";
        commands["quit"]                                = "MPIEnabled"; 
 
 }
@@ -412,6 +420,10 @@ Command* CommandFactory::getCommand(string commandName, string optionString){
                else if(commandName == "make.shared")                   {       command = new SharedCommand(optionString);                                      }
                else if(commandName == "get.commandinfo")               {       command = new GetCommandInfoCommand(optionString);                      }
                else if(commandName == "deunique.tree")                 {       command = new DeuniqueTreeCommand(optionString);                        }
+               else if(commandName == "count.seqs")                    {       command = new CountSeqsCommand(optionString);                           }
+               else if(commandName == "count.groups")                  {       command = new CountGroupsCommand(optionString);                         }
+               else if(commandName == "clear.memory")                  {       command = new ClearMemoryCommand(optionString);                         }
+               else if(commandName == "summary.tax")                   {       command = new SummaryTaxCommand(optionString);                          }
                else                                                                                    {       command = new NoCommand(optionString);                                          }
 
                return command;
@@ -549,6 +561,10 @@ Command* CommandFactory::getCommand(string commandName, string optionString, str
                else if(commandName == "make.shared")                   {       pipecommand = new SharedCommand(optionString);                                  }
                else if(commandName == "get.commandinfo")               {       pipecommand = new GetCommandInfoCommand(optionString);                  }
                else if(commandName == "deunique.tree")                 {       pipecommand = new DeuniqueTreeCommand(optionString);                    }
+               else if(commandName == "count.seqs")                    {       pipecommand = new CountSeqsCommand(optionString);                               }
+               else if(commandName == "count.groups")                  {       pipecommand = new CountGroupsCommand(optionString);                             }
+               else if(commandName == "clear.memory")                  {       pipecommand = new ClearMemoryCommand(optionString);                             }
+               else if(commandName == "summary.tax")                   {       pipecommand = new SummaryTaxCommand(optionString);                              }
                else                                                                                    {       pipecommand = new NoCommand(optionString);                                              }
 
                return pipecommand;
@@ -674,6 +690,10 @@ Command* CommandFactory::getCommand(string commandName){
                else if(commandName == "make.shared")                   {       shellcommand = new SharedCommand();                                     }
                else if(commandName == "get.commandinfo")               {       shellcommand = new GetCommandInfoCommand();                     }
                else if(commandName == "deunique.tree")                 {       shellcommand = new DeuniqueTreeCommand();                       }
+               else if(commandName == "count.seqs")                    {       shellcommand = new CountSeqsCommand();                          }
+               else if(commandName == "count.groups")                  {       shellcommand = new CountGroupsCommand();                        }
+               else if(commandName == "clear.memory")                  {       shellcommand = new ClearMemoryCommand();                        }
+               else if(commandName == "summary.tax")                   {       shellcommand = new SummaryTaxCommand();                         }
                else                                                                                    {       shellcommand = new NoCommand();                                         }
 
                return shellcommand;