]> git.donarmstrong.com Git - mothur.git/blob - classifytreecommand.h
Merge remote-tracking branch 'mothur/master'
[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
16 class ClassifyTreeCommand : public Command {
17 public:
18         ClassifyTreeCommand(string);
19         ClassifyTreeCommand();
20         ~ClassifyTreeCommand(){}
21         
22         vector<string> setParameters();
23         string getCommandName()                 { return "classify.tree";                               }
24         string getCommandCategory()             { return "Phylotype Analysis";          }
25         string getOutputFileNameTag(string, string);
26         string getHelpString(); 
27         string getCitation() { return "http://www.mothur.org/wiki/Classify.tree"; }
28         string getDescription()         { return "Find the consensus taxonomy for the descendant of each tree node"; }
29     
30         int execute();
31         void help() { m->mothurOut(getHelpString()); }  
32         
33 private:
34         string treefile, taxonomyfile, groupfile, namefile, outputDir;
35         bool abort;
36         vector<string> outputNames;
37     int numUniquesInName, cutoff;
38     map<string, string> nameMap;
39     map<string, int> nameCount;
40     map<string, string> taxMap;
41         
42         int getClassifications(Tree*&);
43         map<string, set<string> > getDescendantList(Tree*&, int, map<int, map<string, set<string> > >);
44     string getTaxonomy(set<string>, int&);
45         
46 };
47
48
49
50 #endif