X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=commandfactory.cpp;h=e8e9c2754677ee639fce944fbc533d3bd9eb98db;hp=0c9504d09a109a39168af9b9d582ef20732e6647;hb=b206f634aae1b4ce13978d203247fb64757d5482;hpb=bb8d942036365d2a66330944269f17841ed2388a diff --git a/commandfactory.cpp b/commandfactory.cpp index 0c9504d..e8e9c27 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,29 @@ #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" +#include "mergesfffilecommand.h" /*******************************************************/ @@ -162,9 +182,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 +298,32 @@ 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"; + commands["merge.sfffiles"] = "merge.sfffiles"; + } /***********************************************************/ @@ -304,7 +346,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