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. */
31 class ClusterCommand : public Command {
39 GlobalData* globaldata;
44 RAbundVector oldRAbund;
47 string method, fileroot, tag;
49 int precision, length;
50 ofstream sabundFile, rabundFile, listFile;
52 void printData(string label);