X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=commandfactory.cpp;h=0c9504d09a109a39168af9b9d582ef20732e6647;hb=82723a54e6109e2d46d84c10e87727cebd5a18ea;hp=2fc6875c6430bd769e3e8b56e484b5da1561a30c;hpb=96f25c3c0f3ba2a1634094de146630dbc9ee0d03;p=mothur.git diff --git a/commandfactory.cpp b/commandfactory.cpp index 2fc6875..0c9504d 100644 --- a/commandfactory.cpp +++ b/commandfactory.cpp @@ -36,8 +36,6 @@ #include "binsequencecommand.h" #include "getoturepcommand.h" #include "treegroupscommand.h" -#include "bootstrapsharedcommand.h" -//#include "consensuscommand.h" #include "distancecommand.h" #include "aligncommand.h" #include "matrixoutputcommand.h" @@ -123,6 +121,15 @@ #include "countgroupscommand.h" #include "clearmemorycommand.h" #include "summarytaxcommand.h" +#include "chimeraperseuscommand.h" +#include "shhhseqscommand.h" +#include "summaryqualcommand.h" +#include "otuassociationcommand.h" +#include "sortseqscommand.h" +#include "classifytreecommand.h" +#include "cooccurrencecommand.h" +#include "pcrseqscommand.h" +#include "createdatabasecommand.h" /*******************************************************/ @@ -182,8 +189,6 @@ CommandFactory::CommandFactory(){ commands["get.label"] = "get.label"; commands["get.sabund"] = "get.sabund"; commands["get.rabund"] = "get.rabund"; - commands["bootstrap.shared"] = "bootstrap.shared"; - //commands["consensus"] = "consensus"; commands["help"] = "help"; commands["reverse.seqs"] = "reverse.seqs"; commands["trim.seqs"] = "trim.seqs"; @@ -201,7 +206,7 @@ CommandFactory::CommandFactory(){ commands["pre.cluster"] = "pre.cluster"; commands["pcoa"] = "pcoa"; commands["otu.hierarchy"] = "otu.hierarchy"; - commands["set.dir"] = "set.dir"; + commands["set.dir"] = "MPIEnabled"; commands["merge.files"] = "merge.files"; commands["parse.list"] = "parse.list"; commands["set.logfile"] = "set.logfile"; @@ -241,8 +246,8 @@ CommandFactory::CommandFactory(){ commands["anosim"] = "anosim"; commands["make.fastq"] = "make.fastq"; commands["merge.groups"] = "merge.groups"; - commands["get.current"] = "get.current"; - commands["set.current"] = "set.current"; + commands["get.current"] = "MPIEnabled"; + commands["set.current"] = "MPIEnabled"; commands["get.commandinfo"] = "get.commandinfo"; commands["deunique.tree"] = "deunique.tree"; commands["count.seqs"] = "count.seqs"; @@ -258,6 +263,7 @@ CommandFactory::CommandFactory(){ commands["chimera.check"] = "MPIEnabled"; commands["chimera.slayer"] = "MPIEnabled"; commands["chimera.uchime"] = "chimera.uchime"; + commands["chimera.perseus"] = "chimera.perseus"; commands["chimera.pintail"] = "MPIEnabled"; commands["chimera.bellerophon"] = "MPIEnabled"; commands["screen.seqs"] = "MPIEnabled"; @@ -266,7 +272,15 @@ CommandFactory::CommandFactory(){ commands["shhh.flows"] = "MPIEnabled"; commands["sens.spec"] = "sens.spec"; commands["seq.error"] = "seq.error"; - commands["seq.error"] = "summary.tax"; + commands["summary.tax"] = "summary.tax"; + commands["summary.qual"] = "summary.qual"; + commands["shhh.seqs"] = "shhh.seqs"; + commands["otu.association"] = "otu.association"; + 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"; } @@ -297,6 +311,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 @@ -340,8 +355,6 @@ Command* CommandFactory::getCommand(string commandName, string optionString){ else if(commandName == "get.oturep") { command = new GetOTURepCommand(optionString); } else if(commandName == "tree.shared") { command = new TreeGroupCommand(optionString); } else if(commandName == "dist.shared") { command = new MatrixOutputCommand(optionString); } - else if(commandName == "bootstrap.shared") { command = new BootSharedCommand(optionString); } - else if(commandName == "consensus") { command = new ConcensusCommand(optionString); } else if(commandName == "dist.seqs") { command = new DistanceCommand(optionString); } else if(commandName == "align.seqs") { command = new AlignCommand(optionString); } else if(commandName == "summary.seqs") { command = new SeqSummaryCommand(optionString); } @@ -424,6 +437,15 @@ Command* CommandFactory::getCommand(string commandName, string 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 if(commandName == "summary.qual") { command = new SummaryQualCommand(optionString); } + else if(commandName == "chimera.perseus") { command = new ChimeraPerseusCommand(optionString); } + else if(commandName == "shhh.seqs") { command = new ShhhSeqsCommand(optionString); } + else if(commandName == "otu.association") { command = new OTUAssociationCommand(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; @@ -482,8 +504,6 @@ Command* CommandFactory::getCommand(string commandName, string optionString, str else if(commandName == "get.oturep") { pipecommand = new GetOTURepCommand(optionString); } else if(commandName == "tree.shared") { pipecommand = new TreeGroupCommand(optionString); } else if(commandName == "dist.shared") { pipecommand = new MatrixOutputCommand(optionString); } - else if(commandName == "bootstrap.shared") { pipecommand = new BootSharedCommand(optionString); } - else if(commandName == "consensus") { pipecommand = new ConcensusCommand(optionString); } else if(commandName == "dist.seqs") { pipecommand = new DistanceCommand(optionString); } else if(commandName == "align.seqs") { pipecommand = new AlignCommand(optionString); } else if(commandName == "summary.seqs") { pipecommand = new SeqSummaryCommand(optionString); } @@ -565,6 +585,15 @@ Command* CommandFactory::getCommand(string commandName, string optionString, str 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 if(commandName == "summary.qual") { pipecommand = new SummaryQualCommand(optionString); } + else if(commandName == "chimera.perseus") { pipecommand = new ChimeraPerseusCommand(optionString); } + else if(commandName == "shhh.seqs") { pipecommand = new ShhhSeqsCommand(optionString); } + else if(commandName == "otu.association") { pipecommand = new OTUAssociationCommand(optionString); } + 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; @@ -611,8 +640,6 @@ Command* CommandFactory::getCommand(string commandName){ else if(commandName == "get.oturep") { shellcommand = new GetOTURepCommand(); } else if(commandName == "tree.shared") { shellcommand = new TreeGroupCommand(); } else if(commandName == "dist.shared") { shellcommand = new MatrixOutputCommand(); } - else if(commandName == "bootstrap.shared") { shellcommand = new BootSharedCommand(); } - else if(commandName == "consensus") { shellcommand = new ConcensusCommand(); } else if(commandName == "dist.seqs") { shellcommand = new DistanceCommand(); } else if(commandName == "align.seqs") { shellcommand = new AlignCommand(); } else if(commandName == "summary.seqs") { shellcommand = new SeqSummaryCommand(); } @@ -694,6 +721,15 @@ Command* CommandFactory::getCommand(string commandName){ 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 if(commandName == "summary.qual") { shellcommand = new SummaryQualCommand(); } + else if(commandName == "chimera.perseus") { shellcommand = new ChimeraPerseusCommand(); } + else if(commandName == "shhh.seqs") { shellcommand = new ShhhSeqsCommand(); } + else if(commandName == "otu.association") { shellcommand = new OTUAssociationCommand(); } + 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; @@ -719,7 +755,7 @@ Command* CommandFactory::getCommand(){ exit(1); } } -/***********************************************************************/ +***********************************************************************/ bool CommandFactory::isValidCommand(string command) { try {