]> git.donarmstrong.com Git - mothur.git/blob - mgclustercommand.h
added command descriptions
[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 "Schloss PD, Handelsman J (2008). A statistical toolbox for metagenomics. BMC Bioinformatics 9: 34. \nhttp://www.mothur.org/wiki/Mgcluster"; }
36         string getDescription()         { return "cluster your sequences into OTUs using a blast file"; }
37
38         int execute(); 
39         void help() { m->mothurOut(getHelpString()); }  
40         
41         
42 private:
43         ReadBlast* read;
44         NameAssignment* nameMap;
45         Cluster* cluster;
46         HCluster* hcluster;
47         ListVector* list;
48         ListVector oldList;
49         vector<seqDist> overlapMatrix;
50         vector<string> outputNames;
51         
52         string blastfile, method, namefile, overlapFile, distFile, outputDir;
53         ofstream sabundFile, rabundFile, listFile;
54         double cutoff;
55         float penalty;
56         int precision, length, precisionLength;
57         bool abort, minWanted, hclusterWanted, merge, hard;
58         
59         void printData(ListVector*);
60         ListVector* mergeOPFs(map<string, int>, float);
61         void sortHclusterFiles(string, string);
62         vector<seqDist> getSeqs(ifstream&);
63
64 };
65
66 /**********************************************************************/
67
68 #endif
69
70
71