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