]> git.donarmstrong.com Git - mothur.git/blob - consensusseqscommand.h
major change to the tree class to use the count table class instead of tree map....
[mothur.git] / consensusseqscommand.h
1 #ifndef CONSENSUSSEQSCOMMAND_H
2 #define CONSENSUSSEQSCOMMAND_H
3 //test
4 /*
5  *  consensusseqscommand.h
6  *  Mothur
7  *
8  *  Created by westcott on 11/23/10.
9  *  Copyright 2010 Schloss Lab. All rights reserved.
10  *
11  */
12
13
14 #include "command.hpp"
15 #include "listvector.hpp"
16 #include "counttable.h"
17
18 class ConsensusSeqsCommand : public Command {
19 public:
20         ConsensusSeqsCommand(string);
21         ConsensusSeqsCommand();
22         ~ConsensusSeqsCommand(){}
23         
24         vector<string> setParameters();
25         string getCommandName()                 { return "consensus.seqs";              }
26         string getCommandCategory()             { return "Sequence Processing"; }
27         string getOutputFileNameTag(string, string);
28         string getHelpString(); 
29         string getCitation() { return "http://www.mothur.org/wiki/Consensus.seqs"; }
30         string getDescription()         { return "create a consensus sequence for each OTU or for a fasta file"; }
31
32         
33         int execute(); 
34         void help() { m->mothurOut(getHelpString()); }  
35         
36 private:
37         
38     CountTable ct;
39         bool abort, allLines;
40         string fastafile, listfile, namefile, countfile, label, outputDir;
41         set<string> labels;
42         vector<string> outputNames;
43         map<string, string> fastaMap;
44         map<string, string> nameMap;
45         map<string, int> nameFileMap;
46         int cutoff, seqLength;
47         
48         int readFasta();
49         int readNames();
50         int processList(ListVector*&);
51         string getConsSeq(string, ofstream&, int);
52         char getBase(vector<int>, int);
53 };
54
55 #endif
56
57
58
59