]> git.donarmstrong.com Git - mothur.git/blob - distancecommand.h
2cb653f790aeb970f2a8f9ba7e1122d2f8ef4c57
[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, outFile;
38         ifstream in;
39         string countends, phylip;
40         int processors;
41         float cutoff;
42         map<int, int> processIDS;   //end line, processid
43         map<int, int>::iterator it;
44         vector<linePair*> lines;
45         
46         void appendFiles(string, string);
47         void createProcesses(string);
48         int driver(Dist*, SequenceDB*, int, int, string, float);
49
50 };
51
52 #endif
53
54
55