1 #ifndef CLUSTERCOMMAND_H
2 #define CLUSTERCOMMAND_H
7 * Created by Sarah Westcott on 1/2/09.
8 * Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved.
12 #include "command.hpp"
13 #include "rabundvector.hpp"
14 #include "sabundvector.hpp"
15 #include "listvector.hpp"
16 #include "cluster.hpp"
17 #include "sparsematrix.hpp"
19 /* The cluster() command:
20 The cluster command outputs a .list , .rabund and .sabund files.
21 The cluster command parameter options are method, cuttoff and precision. No parameters are required.
22 The cluster command should be in the following format: cluster(method=yourMethod, cutoff=yourCutoff, precision=yourPrecision).
23 The acceptable methods are furthest, nearest and average. If you do not provide a method the default algorythm is furthest neighbor.
24 The cluster() command outputs three files *.list, *.rabund, and *.sabund. */
27 class ClusterCommand : public Command {
30 ClusterCommand(string);
34 vector<string> setParameters();
35 string getCommandName() { return "cluster"; }
36 string getCommandCategory() { return "Clustering"; }
37 string getHelpString();
38 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"; }
41 void help() { m->mothurOut(getHelpString()); }
48 RAbundVector oldRAbund;
51 bool abort, hard, sim;
53 string method, fileroot, tag, outputDir, phylipfile, columnfile, namefile, format, distfile;
55 string showabund, timing;
56 int precision, length;
57 ofstream sabundFile, rabundFile, listFile;
63 void printData(string label);
64 vector<string> outputNames;