X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=commandfactory.cpp;h=5a32ac1a526450b8d9408a88e0e57cc31e946720;hp=0c9504d09a109a39168af9b9d582ef20732e6647;hb=cf9987b67aa49777a4c91c2d21f96e58bf17aa82;hpb=82723a54e6109e2d46d84c10e87727cebd5a18ea diff --git a/commandfactory.cpp b/commandfactory.cpp index 0c9504d..5a32ac1 100644 --- a/commandfactory.cpp +++ b/commandfactory.cpp @@ -8,9 +8,6 @@ */ #include "command.hpp" -#include "readdistcommand.h" -#include "readtreecommand.h" -#include "readotucommand.h" #include "clustercommand.h" #include "collectcommand.h" #include "collectsharedcommand.h" @@ -130,6 +127,28 @@ #include "cooccurrencecommand.h" #include "pcrseqscommand.h" #include "createdatabasecommand.h" +#include "makebiomcommand.h" +#include "getcoremicrobiomecommand.h" +#include "listotulabelscommand.h" +#include "getotulabelscommand.h" +#include "removeotulabelscommand.h" +#include "makecontigscommand.h" +#include "loadlogfilecommand.h" +#include "sffmultiplecommand.h" +#include "classifyrfsharedcommand.h" +#include "filtersharedcommand.h" +#include "primerdesigncommand.h" +#include "getdistscommand.h" +#include "removedistscommand.h" +#include "mergetaxsummarycommand.h" +#include "getmetacommunitycommand.h" +#include "sparcccommand.h" +#include "makelookupcommand.h" +#include "renameseqscommand.h" +#include "makelefsecommand.h" +#include "lefsecommand.h" +#include "kruskalwalliscommand.h" +#include "sracommand.h" /*******************************************************/ @@ -162,9 +181,6 @@ CommandFactory::CommandFactory(){ append = false; //initialize list of valid commands - commands["read.dist"] = "read.dist"; - commands["read.otu"] = "read.otu"; - commands["read.tree"] = "read.tree"; commands["make.shared"] = "make.shared"; commands["bin.seqs"] = "bin.seqs"; commands["get.oturep"] = "get.oturep"; @@ -281,7 +297,31 @@ CommandFactory::CommandFactory(){ commands["cooccurrence"] = "cooccurrence"; commands["pcr.seqs"] = "pcr.seqs"; commands["create.database"] = "create.database"; + commands["make.biom"] = "make.biom"; + commands["get.coremicrobiome"] = "get.coremicrobiome"; + commands["list.otulabels"] = "list.otulabels"; + commands["get.otulabels"] = "get.otulabels"; + commands["remove.otulabels"] = "remove.otulabels"; + commands["make.contigs"] = "make.contigs"; + commands["load.logfile"] = "load.logfile"; + commands["make.table"] = "make.table"; + commands["sff.multiple"] = "sff.multiple"; commands["quit"] = "MPIEnabled"; + commands["classify.rf"] = "classify.rf"; + commands["filter.shared"] = "filter.shared"; + commands["primer.design"] = "primer.design"; + commands["get.dists"] = "get.dists"; + commands["remove.dists"] = "remove.dists"; + commands["merge.taxsummary"] = "merge.taxsummary"; + commands["get.communitytype"] = "get.communitytype"; + commands["sparcc"] = "sparcc"; + commands["make.lookup"] = "make.lookup"; + commands["rename.seqs"] = "rename.seqs"; + commands["make.lefse"] = "make.lefse"; + commands["lefse"] = "lefse"; + commands["kruskal.wallis"] = "kruskal.wallis"; + commands["sra"] = "sra"; + } /***********************************************************/ @@ -304,7 +344,49 @@ CommandFactory::~CommandFactory(){ delete shellcommand; delete pipecommand; } +/***********************************************************/ +/***********************************************************/ +int CommandFactory::checkForRedirects(string optionString) { + try { + + int pos = optionString.find("outputdir"); + if (pos != string::npos) { //user has set outputdir in command option string + string outputOption = ""; + bool foundEquals = false; + for(int i=pos;i