X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=commandfactory.cpp;h=387ee10833323300a66a0e6d1161a64bff6fb9ee;hp=a4d6506df3128579158f2f1ff5ee99f67bfc9bc2;hb=df7e3ff9f68ef157b0328a2d353c3258c5d45d89;hpb=f09bacac01a842a74c1c1b69070852cc969ff506 diff --git a/commandfactory.cpp b/commandfactory.cpp index a4d6506..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" @@ -48,7 +43,6 @@ #include "reversecommand.h" #include "trimseqscommand.h" #include "mergefilecommand.h" -#include "chimeraseqscommand.h" #include "listseqscommand.h" #include "getseqscommand.h" #include "removeseqscommand.h" @@ -61,16 +55,16 @@ #include "phylotypecommand.h" #include "mgclustercommand.h" #include "preclustercommand.h" -#include "pcacommand.h" +#include "pcoacommand.h" #include "otuhierarchycommand.h" #include "setdircommand.h" #include "parselistscommand.h" -#include "parsesffcommand.h" #include "chimeraccodecommand.h" #include "chimeracheckcommand.h" #include "chimeraslayercommand.h" #include "chimerapintailcommand.h" #include "chimerabellerophoncommand.h" +#include "chimerauchimecommand.h" #include "setlogfilecommand.h" #include "phylodiversitycommand.h" #include "makegroupcommand.h" @@ -94,7 +88,62 @@ #include "parsefastaqcommand.h" #include "pipelinepdscommand.h" #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 "trimflowscommand.h" +#include "corraxescommand.h" +#include "shhhercommand.h" +#include "pcacommand.h" +#include "nmdscommand.h" +#include "removerarecommand.h" +#include "mergegroupscommand.h" +#include "amovacommand.h" +#include "homovacommand.h" +#include "mantelcommand.h" +#include "makefastqcommand.h" +#include "anosimcommand.h" +#include "getcurrentcommand.h" +#include "setcurrentcommand.h" +#include "sharedcommand.h" +#include "getcommandinfocommand.h" +#include "deuniquetreecommand.h" +#include "countseqscommand.h" +#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" +#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" /*******************************************************/ @@ -127,9 +176,7 @@ 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"; commands["cluster"] = "cluster"; @@ -153,14 +200,13 @@ 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"; + commands["trim.flows"] = "trim.flows"; commands["list.seqs"] = "list.seqs"; commands["get.seqs"] = "get.seqs"; - commands["remove.seqs"] = "get.seqs"; + commands["remove.seqs"] = "remove.seqs"; commands["system"] = "system"; commands["align.check"] = "align.check"; commands["get.sharedseqs"] = "get.sharedseqs"; @@ -171,10 +217,9 @@ 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["parse.sff"] = "parse.sff"; commands["set.logfile"] = "set.logfile"; commands["phylo.diversity"] = "phylo.diversity"; commands["make.group"] = "make.group"; @@ -194,23 +239,79 @@ CommandFactory::CommandFactory(){ commands["remove.lineage"] = "remove.lineage"; 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["pca"] = "pca"; + commands["nmds"] = "nmds"; + commands["remove.rare"] = "remove.rare"; + commands["amova"] = "amova"; + commands["homova"] = "homova"; + commands["mantel"] = "mantel"; + commands["anosim"] = "anosim"; + commands["make.fastq"] = "make.fastq"; + commands["merge.groups"] = "merge.groups"; + commands["get.current"] = "MPIEnabled"; + commands["set.current"] = "MPIEnabled"; + commands["get.commandinfo"] = "get.commandinfo"; + commands["deunique.tree"] = "deunique.tree"; + commands["count.seqs"] = "count.seqs"; + commands["count.groups"] = "count.groups"; + commands["clear.memory"] = "clear.memory"; + commands["pairwise.seqs"] = "MPIEnabled"; commands["pipeline.pds"] = "MPIEnabled"; commands["classify.seqs"] = "MPIEnabled"; commands["dist.seqs"] = "MPIEnabled"; commands["filter.seqs"] = "MPIEnabled"; commands["align.seqs"] = "MPIEnabled"; - commands["chimera.seqs"] = "chimera.seqs"; commands["chimera.ccode"] = "MPIEnabled"; 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"; commands["summary.seqs"] = "MPIEnabled"; commands["cluster.split"] = "MPIEnabled"; + commands["shhh.flows"] = "MPIEnabled"; 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"; + } /***********************************************************/ @@ -233,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