]> git.donarmstrong.com Git - mothur.git/blob - distancecommand.h
added citation function to commands
[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         
27         vector<string> setParameters();
28         string getCommandName()                 { return "dist.seqs";                   }
29         string getCommandCategory()             { return "Sequence Processing"; }
30         string getHelpString(); 
31         string getCitation() { return "http://www.mothur.org/wiki/Dist.seqs"; }
32         
33         int execute(); 
34         void help() { m->mothurOut(getHelpString()); }  
35         
36         
37 private:
38         struct distlinePair {
39                 int start;
40                 int end;
41                 
42         };
43         
44         Dist* distCalculator;
45         SequenceDB alignDB;
46
47         string countends, output, fastafile, calc, outputDir, oldfastafile, column, compress;
48
49         int processors, numNewFasta;
50         float cutoff;
51         vector<int> processIDS;   //end line, processid
52         vector<distlinePair> lines;
53         
54         bool abort;
55         vector<string>  Estimators, outputNames; //holds estimators to be used
56         
57         //void m->appendFiles(string, string);
58         void createProcesses(string);
59         int driver(/*Dist*, SequenceDB, */int, int, string, float);
60         int driver(int, int, string, string);
61         
62         #ifdef USE_MPI 
63         int driverMPI(int, int, MPI_File&, float);
64         int driverMPI(int, int, string, unsigned long int&);
65         int driverMPI(int, int, string, unsigned long int&, string);
66         #endif
67         
68         //int convertMatrix(string);
69         bool sanityCheck();
70         //int convertToLowerTriangle(string);
71
72 };
73
74 #endif
75
76
77