]> git.donarmstrong.com Git - mothur.git/blob - hclustercommand.h
working on pam
[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 "hcluster.h"
15 #include "rabundvector.hpp"
16 #include "sabundvector.hpp"
17 #include "listvector.hpp"
18 #include "readcluster.h"
19
20 /******************************************************************/
21 //This command is an implementation of the HCluster algorithmn described in 
22 //ESPRIT: estimating species richness using large collections of 16S rRNA pyrosequences by
23 //Yijun Sun1,2,*, Yunpeng Cai2, Li Liu1, Fahong Yu1, Michael L. Farrell3, William McKendree3 
24 //and William Farmerie1 1 
25
26 //Interdisciplinary Center for Biotechnology Research, 2Department of Electrical and Computer Engineering, 
27 //University of Florida, Gainesville, FL 32610-3622 and 3Materials Technology Directorate, Air Force Technical 
28 //Applications Center, 1030 S. Highway A1A, Patrick AFB, FL 32925-3002, USA 
29 //Received January 28, 2009; Revised April 14, 2009; Accepted April 15, 2009 
30 /************************************************************/
31 class HClusterCommand : public Command {
32         
33 public:
34         HClusterCommand(string);
35         HClusterCommand();      
36         ~HClusterCommand(){}
37         
38         vector<string> setParameters();
39         string getCommandName()                 { return "hcluster";    }
40         string getCommandCategory()             { return "Clustering";  }
41         
42         string getHelpString(); 
43     string getOutputPattern(string);    
44         string getCitation() { return "Sun Y, Cai Y, Liu L, Yu F, Farrell ML, Mckendree W, Farmerie W (2009). ESPRIT: estimating species richness using large collections of 16S rRNA pyrosequences. Nucleic Acids Res 37: e76. \nhttp://www.mothur.org/wiki/Hcluster"; }
45         string getDescription()         { return "cluster your sequences into OTUs using a distance matrix"; }
46
47         int execute(); 
48         void help() { m->mothurOut(getHelpString()); }  
49         
50         
51 private:
52         HCluster* cluster;
53         ListVector* list;
54         RAbundVector* rabund;
55         RAbundVector oldRAbund;
56         ListVector oldList;
57         ReadCluster* read;
58         
59         bool abort, sorted, print_start, hard;
60         string method, fileroot, tag, distfile, format, phylipfile, columnfile, namefile, sort, showabund, timing, outputDir;
61         double cutoff;
62         int precision, length;
63         ofstream sabundFile, rabundFile, listFile;
64         time_t start;
65         unsigned long loops;
66         vector<string> outputNames;
67         
68         void printData(string label);
69 };
70
71 /************************************************************/
72
73 #endif