]> git.donarmstrong.com Git - mothur.git/blob - distancecommand.h
8322eeedee6721ae333fdcbd6bc0447c9d654c53
[mothur.git] / distancecommand.h
1 #ifndef DISTANCECOMMAND_H
2 #define DISTANCECOMMAND_H
3
4 /*
5  *  distancecommand.h
6  *  Mothur
7  *
8  *  Created by Sarah Westcott on 5/7/09.
9  *  Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved.
10  *
11  */
12
13 #include "mothur.h"
14 #include "command.hpp"
15 #include "globaldata.hpp"
16 #include "validcalculator.h"
17 #include "dist.h"
18 #include "sequencedb.h"
19
20 struct linePair {
21         int start;
22         int end;
23 };
24
25 class DistanceCommand : public Command {
26
27 public:
28         DistanceCommand();      
29         ~DistanceCommand() {};
30         int execute();  
31         
32 private:
33         GlobalData* globaldata;
34         ValidCalculators* validCalculator;
35         Dist* distCalculator;
36         SequenceDB* seqDB;
37         ofstream out, phylipOut;
38         ifstream in;
39         string outputFileName;
40         string countends, phylip;
41         int processors;
42         float cutoff;
43         map<int, int> processIDS;   //end line, processid
44         map<int, int>::iterator it;
45         vector<linePair*> lines;
46         
47         void appendFiles(string, string);
48         void createProcesses(string, string);
49         int driver(Dist*, SequenceDB*, int, int, string, string, float);
50
51 };
52
53 #endif
54
55
56