]> git.donarmstrong.com Git - mothur.git/blob - distancecommand.h
added pipeline commands which involved change to command factory and command class...
[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         ~DistanceCommand();
26         vector<string> getRequiredParameters();
27         vector<string> getValidParameters();
28         vector<string> getRequiredFiles();
29         map<string, vector<string> > getOutputFiles() { return outputTypes; }
30         int execute();  
31         void help();
32         
33 private:
34         struct linePair {
35                 int start;
36                 int end;
37         };
38         
39         Dist* distCalculator;
40         SequenceDB alignDB;
41
42         string countends, output, fastafile, calc, outputDir, oldfastafile, column, compress;
43
44         int processors, numNewFasta;
45         float cutoff;
46         map<int, int> processIDS;   //end line, processid
47         vector<linePair*> lines;
48         
49         bool abort;
50         vector<string>  Estimators, outputNames; //holds estimators to be used
51         map<string, vector<string> > outputTypes;
52         
53         //void m->appendFiles(string, string);
54         void createProcesses(string);
55         int driver(/*Dist*, SequenceDB, */int, int, string, float);
56         int driver(int, int, string, string);
57         
58         #ifdef USE_MPI 
59         int driverMPI(int, int, MPI_File&, float);
60         int driverMPI(int, int, string, unsigned long int&);
61         int driverMPI(int, int, string, unsigned long int&, string);
62         #endif
63         
64         //int convertMatrix(string);
65         bool sanityCheck();
66         //int convertToLowerTriangle(string);
67
68 };
69
70 #endif
71
72
73