]> git.donarmstrong.com Git - mothur.git/blob - mgclustercommand.h
fixed bug with tree reading
[mothur.git] / mgclustercommand.h
1 #ifndef MGCLUSTERCOMMAND_H
2 #define MGCLUSTERCOMMAND_H
3
4 /*
5  *  mgclustercommand.h
6  *  Mothur
7  *
8  *  Created by westcott on 12/11/09.
9  *  Copyright 2009 Schloss Lab. All rights reserved.
10  *
11  */
12
13 #include "command.hpp"
14 #include "readblast.h"
15 #include "sparsematrix.hpp"
16 #include "nameassignment.hpp"
17 #include "cluster.hpp"
18 #include "hcluster.h"
19 #include "rabundvector.hpp"
20 #include "sabundvector.hpp"
21
22 /**********************************************************************/
23
24 class MGClusterCommand : public Command {
25
26 public:
27         MGClusterCommand(string);
28         MGClusterCommand();
29         ~MGClusterCommand(){}
30         
31         vector<string> setParameters();
32         string getCommandName()                 { return "mgcluster";   }
33         string getCommandCategory()             { return "Clustering";  }
34         string getHelpString(); 
35         
36         int execute(); 
37         void help() { m->mothurOut(getHelpString()); }  
38         
39         
40 private:
41         ReadBlast* read;
42         NameAssignment* nameMap;
43         Cluster* cluster;
44         HCluster* hcluster;
45         ListVector* list;
46         ListVector oldList;
47         vector<seqDist> overlapMatrix;
48         vector<string> outputNames;
49         
50         string blastfile, method, namefile, overlapFile, distFile, outputDir;
51         ofstream sabundFile, rabundFile, listFile;
52         double cutoff;
53         float penalty;
54         int precision, length, precisionLength;
55         bool abort, minWanted, hclusterWanted, merge, hard;
56         
57         void printData(ListVector*);
58         ListVector* mergeOPFs(map<string, int>, float);
59         void sortHclusterFiles(string, string);
60         vector<seqDist> getSeqs(ifstream&);
61
62 };
63
64 /**********************************************************************/
65
66 #endif
67
68
69