]> git.donarmstrong.com Git - mothur.git/blob - mgclustercommand.h
added citation function to commands
[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         string getCitation() { return "http://www.mothur.org/wiki/Mgcluster"; }
36         
37         int execute(); 
38         void help() { m->mothurOut(getHelpString()); }  
39         
40         
41 private:
42         ReadBlast* read;
43         NameAssignment* nameMap;
44         Cluster* cluster;
45         HCluster* hcluster;
46         ListVector* list;
47         ListVector oldList;
48         vector<seqDist> overlapMatrix;
49         vector<string> outputNames;
50         
51         string blastfile, method, namefile, overlapFile, distFile, outputDir;
52         ofstream sabundFile, rabundFile, listFile;
53         double cutoff;
54         float penalty;
55         int precision, length, precisionLength;
56         bool abort, minWanted, hclusterWanted, merge, hard;
57         
58         void printData(ListVector*);
59         ListVector* mergeOPFs(map<string, int>, float);
60         void sortHclusterFiles(string, string);
61         vector<seqDist> getSeqs(ifstream&);
62
63 };
64
65 /**********************************************************************/
66
67 #endif
68
69
70