X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=clustercommand.h;h=96b7c08861f216862de0c1e600d07fed463eb56a;hp=5dbeb73e2a5e133669f1d5ffd0d61a85731ed9a5;hb=a8e2df1b96a57f5f29576b08361b86a96a8eff4f;hpb=58cf1d08fee8c64334979075fa57bcafb035a2ed diff --git a/clustercommand.h b/clustercommand.h index 5dbeb73..96b7c08 100644 --- a/clustercommand.h +++ b/clustercommand.h @@ -9,18 +9,15 @@ * */ -#include -#include -#include "globaldata.hpp" #include "command.hpp" #include "rabundvector.hpp" #include "sabundvector.hpp" #include "listvector.hpp" #include "cluster.hpp" -#include "sparsematrix.hpp" +#include "sparsedistancematrix.h" +#include "counttable.h" /* The cluster() command: - The cluster command can only be executed after a successful read.phylip or read.column command. The cluster command outputs a .list , .rabund and .sabund files. The cluster command parameter options are method, cuttoff and precision. No parameters are required. The cluster command should be in the following format: cluster(method=yourMethod, cutoff=yourCutoff, precision=yourPrecision). @@ -28,30 +25,49 @@ The cluster() command outputs three files *.list, *.rabund, and *.sabund. */ -class GlobalData; - class ClusterCommand : public Command { public: - ClusterCommand(); + ClusterCommand(string); + ClusterCommand(); ~ClusterCommand(); - int execute(); + + vector setParameters(); + string getCommandName() { return "cluster"; } + string getCommandCategory() { return "Clustering"; } + + string getHelpString(); + string getOutputPattern(string); + string getCitation() { return "Schloss PD, Westcott SL (2011). Assessing and improving methods used in OTU-based approaches for 16S rRNA gene sequence analysis. Appl Environ Microbiol 77:3219.\nSchloss PD, Handelsman J (2005). Introducing DOTUR, a computer program for defining operational taxonomic units and estimating species richness. Appl Environ Microbiol 71: 1501-6.\nhttp://www.mothur.org/wiki/Cluster"; } + string getDescription() { return "cluster your sequences into OTUs using a distance matrix"; } + + int execute(); + void help() { m->mothurOut(getHelpString()); } private: - GlobalData* globaldata; Cluster* cluster; - SparseMatrix* matrix; + SparseDistanceMatrix* matrix; ListVector* list; RAbundVector* rabund; RAbundVector oldRAbund; ListVector oldList; - - string method, fileroot, tag; + + bool abort, hard, sim; + + string method, fileroot, tag, outputDir, phylipfile, columnfile, namefile, format, distfile, countfile; double cutoff; + string showabund, timing; int precision, length; ofstream sabundFile, rabundFile, listFile; + + bool print_start; + time_t start; + unsigned long loops; void printData(string label); + vector outputNames; + + int createRabund(CountTable*&, ListVector*&, RAbundVector*&); }; #endif