]> git.donarmstrong.com Git - mothur.git/blobdiff - commandfactory.cpp
fixed memory leak in decalc findClosest function used by chimera slayer
[mothur.git] / commandfactory.cpp
index 927f3742216529f54ea12a769bae752501b7fe33..f1a710508b537aa35085c5af3d04c31ee3d9bdcd 100644 (file)
 #include "deuniqueseqscommand.h"
 #include "pairwiseseqscommand.h"
 #include "clusterdoturcommand.h"
-
+#include "subsamplecommand.h"
+#include "removegroupscommand.h"
+#include "getgroupscommand.h"
+#include "getotuscommand.h"
+#include "removeotuscommand.h"
+#include "indicatorcommand.h"
+#include "consensusseqscommand.h"
+#include "corraxescommand.h"
 
 /*******************************************************/
 
@@ -197,6 +204,14 @@ CommandFactory::CommandFactory(){
        commands["fastq.info"]                  = "fastq.info";
        commands["deunique.seqs"]               = "deunique.seqs";
        commands["cluster.classic"]             = "cluster.classic";
+       commands["sub.sample"]                  = "sub.sample";
+       commands["remove.groups"]               = "remove.groups";
+       commands["get.groups"]                  = "get.groups";
+       commands["get.otus"]                    = "get.otus";
+       commands["remove.otus"]                 = "remove.otus";
+       commands["indicator"]                   = "indicator";
+       commands["consensus.seqs"]              = "consensus.seqs";
+       commands["corr.axes"]                   = "corr.axes";
        commands["pairwise.seqs"]               = "MPIEnabled";
        commands["pipeline.pds"]                = "MPIEnabled";
        commands["classify.seqs"]               = "MPIEnabled"; 
@@ -339,11 +354,19 @@ Command* CommandFactory::getCommand(string commandName, string optionString){
                else if(commandName == "cluster.fragments")             {       command = new ClusterFragmentsCommand(optionString);            }
                else if(commandName == "get.lineage")                   {       command = new GetLineageCommand(optionString);                          }
                else if(commandName == "remove.lineage")                {       command = new RemoveLineageCommand(optionString);                       }
+               else if(commandName == "get.groups")                    {       command = new GetGroupsCommand(optionString);                           }
+               else if(commandName == "remove.groups")                 {       command = new RemoveGroupsCommand(optionString);                        }
+               else if(commandName == "get.otus")                              {       command = new GetOtusCommand(optionString);                                     }
+               else if(commandName == "remove.otus")                   {       command = new RemoveOtusCommand(optionString);                          }
                else if(commandName == "fastq.info")                    {       command = new ParseFastaQCommand(optionString);                         }
                else if(commandName == "pipeline.pds")                  {       command = new PipelineCommand(optionString);                            }
                else if(commandName == "deunique.seqs")                 {       command = new DeUniqueSeqsCommand(optionString);                        }
                else if(commandName == "pairwise.seqs")                 {       command = new PairwiseSeqsCommand(optionString);                        }
                else if(commandName == "cluster.classic")               {       command = new ClusterDoturCommand(optionString);                        }
+               else if(commandName == "sub.sample")                    {       command = new SubSampleCommand(optionString);                           }
+               else if(commandName == "indicator")                             {       command = new IndicatorCommand(optionString);                           }
+               else if(commandName == "consensus.seqs")                {       command = new ConsensusSeqsCommand(optionString);                       }
+               else if(commandName == "corr.axes")                             {       command = new CorrAxesCommand(optionString);                            }
                else                                                                                    {       command = new NoCommand(optionString);                                          }
 
                return command;
@@ -453,11 +476,19 @@ Command* CommandFactory::getCommand(string commandName, string optionString, str
                else if(commandName == "split.groups")                  {       pipecommand = new SplitGroupCommand(optionString);                              }
                else if(commandName == "cluster.fragments")             {       pipecommand = new ClusterFragmentsCommand(optionString);                }
                else if(commandName == "get.lineage")                   {       pipecommand = new GetLineageCommand(optionString);                              }
+               else if(commandName == "get.groups")                    {       pipecommand = new GetGroupsCommand(optionString);                               }
                else if(commandName == "remove.lineage")                {       pipecommand = new RemoveLineageCommand(optionString);                   }
+               else if(commandName == "remove.groups")                 {       pipecommand = new RemoveGroupsCommand(optionString);                    }
+               else if(commandName == "get.otus")                              {       pipecommand = new GetOtusCommand(optionString);                                 }
+               else if(commandName == "remove.otus")                   {       pipecommand = new RemoveOtusCommand(optionString);                              }
                else if(commandName == "fastq.info")                    {       pipecommand = new ParseFastaQCommand(optionString);                             }
                else if(commandName == "deunique.seqs")                 {       pipecommand = new DeUniqueSeqsCommand(optionString);                    }
                else if(commandName == "pairwise.seqs")                 {       pipecommand = new PairwiseSeqsCommand(optionString);                    }
                else if(commandName == "cluster.classic")               {       pipecommand = new ClusterDoturCommand(optionString);                    }
+               else if(commandName == "sub.sample")                    {       pipecommand = new SubSampleCommand(optionString);                               }
+               else if(commandName == "indicator")                             {       pipecommand = new IndicatorCommand(optionString);                               }
+               else if(commandName == "consensus.seqs")                {       pipecommand = new ConsensusSeqsCommand(optionString);                   }
+               else if(commandName == "corr.axes")                             {       pipecommand = new CorrAxesCommand(optionString);                                }
                else                                                                                    {       pipecommand = new NoCommand(optionString);                                              }
 
                return pipecommand;
@@ -556,10 +587,18 @@ Command* CommandFactory::getCommand(string commandName){
                else if(commandName == "cluster.fragments")             {       shellcommand = new ClusterFragmentsCommand();           }
                else if(commandName == "get.lineage")                   {       shellcommand = new GetLineageCommand();                         }
                else if(commandName == "remove.lineage")                {       shellcommand = new RemoveLineageCommand();                      }
+               else if(commandName == "get.groups")                    {       shellcommand = new GetGroupsCommand();                          }
+               else if(commandName == "remove.groups")                 {       shellcommand = new RemoveGroupsCommand();                       }
+               else if(commandName == "get.otus")                              {       shellcommand = new GetOtusCommand();                            }
+               else if(commandName == "remove.otus")                   {       shellcommand = new RemoveOtusCommand();                         }
                else if(commandName == "fastq.info")                    {       shellcommand = new ParseFastaQCommand();                        }
                else if(commandName == "deunique.seqs")                 {       shellcommand = new DeUniqueSeqsCommand();                       }
                else if(commandName == "pairwise.seqs")                 {       shellcommand = new PairwiseSeqsCommand();                       }
                else if(commandName == "cluster.classic")               {       shellcommand = new ClusterDoturCommand();                       }
+               else if(commandName == "sub.sample")                    {       shellcommand = new SubSampleCommand();                          }
+               else if(commandName == "indicator")                             {       shellcommand = new IndicatorCommand();                          }
+               else if(commandName == "consensus.seqs")                {       shellcommand = new ConsensusSeqsCommand();                      }
+               else if(commandName == "corr.axes")                             {       shellcommand = new CorrAxesCommand();                           }
                else                                                                                    {       shellcommand = new NoCommand();                                         }
 
                return shellcommand;