]> git.donarmstrong.com Git - mothur.git/blob - distancecommand.h
bf463a00d238cd6da3b21213f0d393ee6ff895c9
[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 "validcalculator.h"
16 #include "dist.h"
17 #include "sequencedb.h"
18
19
20 class DistanceCommand : public Command {
21
22 public:
23         DistanceCommand(string);
24         ~DistanceCommand();
25         int execute();  
26         void help();
27         
28 private:
29         struct linePair {
30                 int start;
31                 int end;
32         };
33         
34         Dist* distCalculator;
35         SequenceDB alignDB;
36
37         string countends, output, fastafile, calc, outputDir, oldfastafile, column, compress;
38
39         int processors, numNewFasta;
40         float cutoff;
41         map<int, int> processIDS;   //end line, processid
42         vector<linePair*> lines;
43         
44         bool abort;
45         vector<string>  Estimators; //holds estimators to be used
46         
47         //void m->appendFiles(string, string);
48         void createProcesses(string);
49         int driver(/*Dist*, SequenceDB, */int, int, string, float);
50         int driver(int, int, string, string);
51         
52         #ifdef USE_MPI 
53         int driverMPI(int, int, MPI_File&, float);
54         int driverMPI(int, int, string, unsigned long int&);
55         int driverMPI(int, int, string, unsigned long int&, string);
56         #endif
57         
58         //int convertMatrix(string);
59         bool sanityCheck();
60         //int convertToLowerTriangle(string);
61
62 };
63
64 #endif
65
66
67