]> git.donarmstrong.com Git - mothur.git/blob - distancecommand.h
changes to dist.seqs and pairwise.seqs and cluster.classic no longer resizes
[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 distlinePair {
35                 int start;
36                 int end;
37                 
38         };
39         
40         Dist* distCalculator;
41         SequenceDB alignDB;
42
43         string countends, output, fastafile, calc, outputDir, oldfastafile, column, compress;
44
45         int processors, numNewFasta;
46         float cutoff;
47         vector<int> processIDS;   //end line, processid
48         vector<distlinePair> lines;
49         
50         bool abort;
51         vector<string>  Estimators, outputNames; //holds estimators to be used
52         map<string, vector<string> > outputTypes;
53         
54         //void m->appendFiles(string, string);
55         void createProcesses(string);
56         int driver(/*Dist*, SequenceDB, */int, int, string, float);
57         int driver(int, int, string, string);
58         
59         #ifdef USE_MPI 
60         int driverMPI(int, int, MPI_File&, float);
61         int driverMPI(int, int, string, unsigned long int&);
62         int driverMPI(int, int, string, unsigned long int&, string);
63         #endif
64         
65         //int convertMatrix(string);
66         bool sanityCheck();
67         //int convertToLowerTriangle(string);
68
69 };
70
71 #endif
72
73
74