X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=commandfactory.cpp;h=387ee10833323300a66a0e6d1161a64bff6fb9ee;hp=b49df720cf5a87d9db41126f2c8a148c6f5245ca;hb=a8e2df1b96a57f5f29576b08361b86a96a8eff4f;hpb=88fbc534a92cb91900e98a3288dfa1f68828b69b diff --git a/commandfactory.cpp b/commandfactory.cpp index b49df72..387ee10 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" @@ -36,8 +33,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" @@ -125,6 +120,30 @@ #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" +#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 "classifysharedcommand.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" /*******************************************************/ @@ -157,9 +176,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"; @@ -184,8 +200,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"; @@ -270,9 +284,34 @@ CommandFactory::CommandFactory(){ commands["sens.spec"] = "sens.spec"; commands["seq.error"] = "seq.error"; 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["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.shared"] = "classify.shared"; + 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.metacommunity"] = "get.metacommunity"; + commands["sparcc"] = "sparcc"; + commands["make.lookup"] = "make.lookup"; + } /***********************************************************/ @@ -295,15 +334,60 @@ 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