]> git.donarmstrong.com Git - mothur.git/blob - getoturepcommand.h
added get.oturep 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 #include "command.hpp"
13 #include "globaldata.hpp"
14 #include "sparsematrix.hpp"
15 #include "listvector.hpp"
16 #include "inputdata.h"
17 #include "readmatrix.hpp"
18 #include "fastamap.h"
19
20
21 class GlobalData;
22
23 typedef list<PCell>::iterator MatData;
24
25 class GetOTURepCommand : public Command {
26         
27 public:
28         GetOTURepCommand();     
29         ~GetOTURepCommand();
30         int execute();  
31         
32 private:
33         GlobalData* globaldata;
34         SparseMatrix* matrix;
35         ListVector* list;
36         ListVector* listOfNames;
37         ReadMatrix* read;
38         InputData* input;
39         FastaMap* fasta;
40         string filename, fastafile, namesfile;
41         ofstream out;
42         ifstream in, inNames;
43         
44          
45         map<string, int> nameToIndex;  //maps sequence name to index in sparsematrix
46         map<int, string>::iterator it;
47         map<int, string>::iterator it2;
48         map<string, int>::iterator it3;
49         
50         void readNamesFile();
51         string FindRep(int); // returns name of "representative" sequence of given bin.
52
53 };
54
55 #endif
56