]> git.donarmstrong.com Git - mothur.git/blob - classifyotucommand.h
added load.logfile command. changed summary.single output for subsample=t.
[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
17
18 class ClassifyOtuCommand : public Command {
19
20 public:
21         ClassifyOtuCommand(string);
22         ClassifyOtuCommand();
23         ~ClassifyOtuCommand() {}
24         
25         vector<string> setParameters();
26         string getCommandName()                 { return "classify.otu";                }
27         string getCommandCategory()             { return "Phylotype Analysis";  }
28         string getOutputFileNameTag(string, string);
29         string getHelpString(); 
30         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. \nhttp://www.mothur.org/wiki/Classify.otu"; }
31         string getDescription()         { return "find the concensus taxonomy for each OTU"; }
32         
33         int execute(); 
34         void help() { m->mothurOut(getHelpString()); }  
35
36 private:
37
38         ListVector* list;
39         InputData* input;
40         string listfile, namefile, taxfile, label, outputDir, refTaxonomy, groupfile, basis;
41         bool abort, allLines, probs;
42         int cutoff;
43         set<string> labels; //holds labels to be used
44         vector<string> outputNames;
45         map<string, string> nameMap;
46         map<string, string> taxMap;
47
48         int process(ListVector*);
49         string addUnclassifieds(string, int);
50         vector<string> findConsensusTaxonomy(int, ListVector*, int&, string&);  // returns the name of the "representative" taxonomy of given bin
51         
52                                                                                                 
53 };
54
55 #endif
56
57