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 "globaldata.hpp"
14 #include "rabundvector.hpp"
15 #include "sabundvector.hpp"
16 #include "listvector.hpp"
17 #include "cluster.hpp"
18 #include "sparsematrix.hpp"
20 /* The cluster() command:
21 The cluster command can only be executed after a successful read.phylip or read.column command.
22 The cluster command outputs a .list , .rabund and .sabund files.
23 The cluster command parameter options are method, cuttoff and precision. No parameters are required.
24 The cluster command should be in the following format: cluster(method=yourMethod, cutoff=yourCutoff, precision=yourPrecision).
25 The acceptable methods are furthest, nearest and average. If you do not provide a method the default algorythm is furthest neighbor.
26 The cluster() command outputs three files *.list, *.rabund, and *.sabund. */
29 class ClusterCommand : public Command {
32 ClusterCommand(string);
38 GlobalData* globaldata;
43 RAbundVector oldRAbund;
48 string method, fileroot, tag, outputDir;
50 string showabund, timing;
51 int precision, length;
52 ofstream sabundFile, rabundFile, listFile;
58 void printData(string label);
59 vector<string> outputNames;