]> git.donarmstrong.com Git - mothur.git/blob - hclustercommand.h
fixed some bugs and added mgcluster command
[mothur.git] / hclustercommand.h
1 #ifndef HCLUSTERCOMMAND_H
2 #define HCLUSTERCOMMAND_H
3
4 /*
5  *  hclustercommand.h
6  *  Mothur
7  *
8  *  Created by westcott on 10/13/09.
9  *  Copyright 2009 Schloss Lab. All rights reserved.
10  *
11  */
12
13 #include "command.hpp"
14 #include "globaldata.hpp"
15 #include "hcluster.h"
16 #include "rabundvector.hpp"
17 #include "sabundvector.hpp"
18 #include "listvector.hpp"
19 #include "readcluster.h"
20
21 /******************************************************************/
22 //This command is an implementation of the HCluster algorythmn described in 
23 //ESPRIT: estimating species richness using large collections of 16S rRNA pyrosequences by
24 //Yijun Sun1,2,*, Yunpeng Cai2, Li Liu1, Fahong Yu1, Michael L. Farrell3, William McKendree3 
25 //and William Farmerie1 1 
26
27 //Interdisciplinary Center for Biotechnology Research, 2Department of Electrical and Computer Engineering, 
28 //University of Florida, Gainesville, FL 32610-3622 and 3Materials Technology Directorate, Air Force Technical 
29 //Applications Center, 1030 S. Highway A1A, Patrick AFB, FL 32925-3002, USA 
30 //Received January 28, 2009; Revised April 14, 2009; Accepted April 15, 2009 
31 /************************************************************/
32 struct seqDist {
33         int seq1;
34         int seq2;
35         float dist;
36 };
37 /************************************************************/
38 class HClusterCommand : public Command {
39         
40 public:
41         HClusterCommand(string);        
42         ~HClusterCommand();
43         int execute();  
44         void help();
45         
46 private:
47         GlobalData* globaldata;
48         HCluster* cluster;
49         ListVector* list;
50         RAbundVector* rabund;
51         RAbundVector oldRAbund;
52         ListVector oldList;
53         ReadCluster* read;
54         
55         bool abort;
56
57         string method, fileroot, tag, distfile, format, phylipfile, columnfile, namefile, sort;
58         double cutoff;
59         string showabund, timing;
60         int precision, length;
61         ofstream sabundFile, rabundFile, listFile;
62         //ifstream in;
63         seqDist next;
64         bool exitedBreak, sorted;
65
66         bool print_start;
67         time_t start;
68         unsigned long loops;
69         
70         void printData(string label);
71         vector<seqDist> getSeqs(ifstream&);
72 };
73
74 /************************************************************/
75
76 #endif