]> git.donarmstrong.com Git - mothur.git/blob - classifytreecommand.h
added modify names parameter to set.dir
[mothur.git] / classifytreecommand.h
1 #ifndef Mothur_classifytreecommand_h
2 #define Mothur_classifytreecommand_h
3
4 //
5 //  classifytreecommand.h
6 //  Mothur
7 //
8 //  Created by Sarah Westcott on 2/20/12.
9 //  Copyright (c) 2012 Schloss Lab. All rights reserved.
10 //
11
12 #include "command.hpp"
13 #include "readtree.h"
14 #include "treemap.h"
15 #include "counttable.h"
16
17 class ClassifyTreeCommand : public Command {
18 public:
19         ClassifyTreeCommand(string);
20         ClassifyTreeCommand();
21         ~ClassifyTreeCommand(){}
22         
23         vector<string> setParameters();
24         string getCommandName()                 { return "classify.tree";                               }
25         string getCommandCategory()             { return "Phylotype Analysis";          }
26         
27         string getHelpString(); 
28     string getOutputPattern(string);    
29         string getCitation() { return "http://www.mothur.org/wiki/Classify.tree"; }
30         string getDescription()         { return "Find the consensus taxonomy for the descendant of each tree node"; }
31     
32         int execute();
33         void help() { m->mothurOut(getHelpString()); }  
34         
35 private:
36         string treefile, taxonomyfile, groupfile, namefile, countfile, outputDir;
37         bool abort;
38         vector<string> outputNames;
39     int numUniquesInName, cutoff;
40     map<string, string> nameMap;
41     map<string, int> nameCount;
42     map<string, string> taxMap;
43     CountTable* ct;
44         
45         int getClassifications(Tree*&);
46         map<string, set<string> > getDescendantList(Tree*&, int, map<int, map<string, set<string> > >);
47     string getTaxonomy(set<string>, int&);
48         
49 };
50
51
52
53 #endif