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