X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=clustercommand.h;h=cd9f47b07d9e8af9a6f04c014fabcfaf36a2818e;hp=268ec315a81e1bbbcbd80051986703f3e02f03d4;hb=cf9987b67aa49777a4c91c2d21f96e58bf17aa82;hpb=0caf3fbabaa3ece404f8ce77f4c883dc5b1bf1dc diff --git a/clustercommand.h b/clustercommand.h index 268ec31..cd9f47b 100644 --- a/clustercommand.h +++ b/clustercommand.h @@ -14,13 +14,14 @@ #include "sabundvector.hpp" #include "listvector.hpp" #include "cluster.hpp" -#include "sparsematrix.hpp" +#include "sparsedistancematrix.h" +#include "counttable.h" /* The cluster() 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). - The acceptable methods are furthest, nearest and average. If you do not provide a method the default algorythm is furthest neighbor. + The acceptable methods are furthest, nearest and average. If you do not provide a method the default algorithm is furthest neighbor. The cluster() command outputs three files *.list, *.rabund, and *.sabund. */ @@ -34,8 +35,10 @@ public: vector setParameters(); string getCommandName() { return "cluster"; } string getCommandCategory() { return "Clustering"; } + string getHelpString(); - 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. \nhttp://www.mothur.org/wiki/Cluster"; } + 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(); @@ -43,7 +46,7 @@ public: private: Cluster* cluster; - SparseMatrix* matrix; + SparseDistanceMatrix* matrix; ListVector* list; RAbundVector* rabund; RAbundVector oldRAbund; @@ -51,8 +54,9 @@ private: bool abort, hard, sim; - string method, fileroot, tag, outputDir, phylipfile, columnfile, namefile, format, distfile; + string method, fileroot, tag, outputDir, phylipfile, columnfile, namefile, format, distfile, countfile; double cutoff; + float adjust; string showabund, timing; int precision, length; ofstream sabundFile, rabundFile, listFile; @@ -63,6 +67,8 @@ private: void printData(string label); vector outputNames; + + int createRabund(CountTable*&, ListVector*&, RAbundVector*&); }; #endif