]> git.donarmstrong.com Git - mothur.git/blob - getoturepcommand.h
started shared utilities, updates to venn and heatmap added tree.groups command
[mothur.git] / getoturepcommand.h
1 #ifndef GETOTUREPCOMMAND_H
2 #define GETOTUREPCOMMAND_H
3 /*
4  *  getoturepcommand.h
5  *  Mothur
6  *
7  *  Created by Sarah Westcott on 4/6/09.
8  *  Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved.
9  *
10  */
11  
12  /* The get.oturep command outputs a .fastarep file for each distance you specify, selecting one OTU representative for each bin. */
13
14 #include "command.hpp"
15 #include "globaldata.hpp"
16 #include "sparsematrix.hpp"
17 #include "listvector.hpp"
18 #include "inputdata.h"
19 #include "readmatrix.hpp"
20 #include "fastamap.h"
21
22
23 class GlobalData;
24
25 typedef list<PCell>::iterator MatData;
26
27 class GetOTURepCommand : public Command {
28         
29 public:
30         GetOTURepCommand();     
31         ~GetOTURepCommand();
32         int execute();  
33         
34 private:
35         GlobalData* globaldata;
36         SparseMatrix* matrix;
37         ListVector* list;
38         ListVector* listOfNames;
39         ReadMatrix* read;
40         InputData* input;
41         FastaMap* fasta;
42         string filename, fastafile, namesfile;
43         ofstream out;
44         ifstream in, inNames;
45         
46          
47         map<string, int> nameToIndex;  //maps sequence name to index in sparsematrix
48         map<int, string>::iterator it;
49         map<int, string>::iterator it2;
50         map<string, int>::iterator it3;
51         
52         void readNamesFile();
53         string FindRep(int); // returns name of "representative" sequence of given bin.
54
55 };
56
57 #endif
58