]> git.donarmstrong.com Git - mothur.git/blob - consensusseqscommand.h
changing command name classify.shared to classifyrf.shared
[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         
28         string getHelpString(); 
29     string getOutputPattern(string);    
30         string getCitation() { return "http://www.mothur.org/wiki/Consensus.seqs"; }
31         string getDescription()         { return "create a consensus sequence for each OTU or for a fasta file"; }
32
33         
34         int execute(); 
35         void help() { m->mothurOut(getHelpString()); }  
36         
37 private:
38         
39     CountTable ct;
40         bool abort, allLines;
41         string fastafile, listfile, namefile, countfile, label, outputDir;
42         set<string> labels;
43         vector<string> outputNames;
44         map<string, string> fastaMap;
45         map<string, string> nameMap;
46         map<string, int> nameFileMap;
47         int cutoff, seqLength;
48         
49         int readFasta();
50         int readNames();
51         int processList(ListVector*&);
52         string getConsSeq(string, ofstream&, int);
53         char getBase(vector<int>, int);
54 };
55
56 #endif
57
58
59
60