]> git.donarmstrong.com Git - mothur.git/blob - classifyotucommand.h
2e76057f1219b8c44785a5be9b6962043bbb68af
[mothur.git] / classifyotucommand.h
1 #ifndef CLASSIFYOTUSCOMMAND_H
2 #define CLASSIFYOTUSCOMMAND_H
3
4 /*
5  *  classifyotucommand.h
6  *  Mothur
7  *
8  *  Created by westcott on 6/1/10.
9  *  Copyright 2010 Schloss Lab. All rights reserved.
10  *
11  */
12  
13 #include "command.hpp"
14 #include "listvector.hpp"
15 #include "inputdata.h"
16 #include "counttable.h"
17
18
19 class ClassifyOtuCommand : public Command {
20
21 public:
22         ClassifyOtuCommand(string);
23         ClassifyOtuCommand();
24         ~ClassifyOtuCommand() {}
25         
26         vector<string> setParameters();
27         string getCommandName()                 { return "classify.otu";                }
28         string getCommandCategory()             { return "Phylotype Analysis";  }
29         string getOutputFileNameTag(string, string);
30         string getHelpString(); 
31         string getCitation() { return "Schloss PD, Westcott SL (2011). Assessing and improving methods used in OTU-based approaches for 16S rRNA gene sequence analysis. Appl Environ Microbiol 77:3219.\nhttp://www.mothur.org/wiki/Classify.otu"; }
32         string getDescription()         { return "find the concensus taxonomy for each OTU"; }
33         
34         int execute(); 
35         void help() { m->mothurOut(getHelpString()); }  
36
37 private:
38     GroupMap* groupMap;
39     CountTable* ct;
40         ListVector* list;
41         InputData* input;
42         string listfile, namefile, taxfile, label, outputDir, refTaxonomy, groupfile, basis, countfile;
43         bool abort, allLines, probs;
44         int cutoff;
45         set<string> labels; //holds labels to be used
46         vector<string> outputNames;
47         map<string, string> nameMap;
48         map<string, string> taxMap;
49
50         int process(ListVector*);
51         string addUnclassifieds(string, int);
52         vector<string> findConsensusTaxonomy(int, ListVector*, int&, string&);  // returns the name of the "representative" taxonomy of given bin
53         
54                                                                                                 
55 };
56
57 #endif
58
59