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