]> git.donarmstrong.com Git - mothur.git/blob - preclustercommand.h
precluster command finished
[mothur.git] / preclustercommand.h
1 #ifndef PRECLUSTERCOMMAND_H
2 #define PRECLUSTERCOMMAND_H
3
4
5 /*
6  *  preclustercommand.h
7  *  Mothur
8  *
9  *  Created by westcott on 12/21/09.
10  *  Copyright 2009 Schloss Lab. All rights reserved.
11  *
12  */
13
14
15 #include "command.hpp"
16 #include "sequence.hpp"
17
18 /************************************************************/
19 struct seqPNode {
20         int numIdentical;
21         Sequence seq;
22         seqPNode() {}
23         seqPNode(int s, Sequence q) : numIdentical(s), seq(q) {}
24         ~seqPNode() {}
25 };
26 /************************************************************/
27
28 class PreClusterCommand : public Command {
29         
30 public:
31         PreClusterCommand(string);      
32         ~PreClusterCommand();
33         int execute();  
34         void help();
35         
36 private:
37         int diffs, length;
38         bool abort;
39         string fastafile, namefile;
40         vector<seqPNode> alignSeqs; //maps the number of identical seqs to a sequence
41         map<string, string> names; //represents the names file first column maps to second column
42         map<string, int> sizes;  //this map a seq name to the number of identical seqs in the names file
43         map<string, bool> active; //maps sequence name to whether it has already been merged or not.
44         
45         int readSeqs();
46         int calcMisMatches(string, string);
47         void readNameFile();
48         void printData(string, string); //fasta filename, names file name
49 };
50
51 /************************************************************/
52
53
54
55
56
57 #endif
58
59