]> git.donarmstrong.com Git - mothur.git/blob - chimeraseqscommand.h
5b55120e0d0981b432f71332dc1db57e8fae5ce7
[mothur.git] / chimeraseqscommand.h
1 #ifndef CHIMERACOMMAND_H
2 #define CHIMERACOMMAND_H
3
4 /*
5  *  chimeraseqscommand.h
6  *  Mothur
7  *
8  *  Created by Sarah Westcott on 6/29/09.
9  *  Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved.
10  *
11  */
12
13 #include "mothur.h"
14 #include "command.hpp"
15 #include "filterseqscommand.h"
16 #include "sequence.hpp"
17 #include "sparsematrix.hpp"
18 #include "dist.h"
19
20 typedef list<PCell>::iterator MatData;
21 typedef map<int, float> SeqMap;  //maps sequence to all distance for that seqeunce
22
23 /***********************************************************/
24
25 class ChimeraSeqsCommand : public Command {
26 public:
27         ChimeraSeqsCommand(string);
28         ~ChimeraSeqsCommand();
29         int execute();
30         void help();
31         
32 private:
33         //Dist* distCalculator;
34         
35         struct Preference {
36                 string leftParent;
37                 string rightParent;
38                 float score;
39
40         };
41
42         Dist* distCalculator;
43         bool abort;
44         string method, fastafile;
45         bool filter, correction;
46         int processors, midpoint;
47         FilterSeqsCommand* filterSeqs;
48         vector<Sequence> seqs;
49         vector<Preference> pref;
50         
51         int findAverageMidPoint();
52         void readSeqs();
53         void generatePreferences(SparseMatrix*, SparseMatrix*);
54         int createSparseMatrix(int, int, SparseMatrix*, vector<Sequence>);
55         
56
57 };
58
59 /***********************************************************/
60
61 #endif
62