]> git.donarmstrong.com Git - mothur.git/blob - distancecommand.h
added command descriptions
[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 "Schloss PD (2010). The effects of alignment quality, distance calculation method, sequence filtering, and region on the analysis of 16S rRNA gene-based studies. PLoS Comput Biol 6: e1000844. \nhttp://www.mothur.org/wiki/Dist.seqs"; }
32         string getDescription()         { return "calculate the pairwaise distances between aligned sequences"; }
33
34         int execute(); 
35         void help() { m->mothurOut(getHelpString()); }  
36         
37         
38 private:
39         struct distlinePair {
40                 int start;
41                 int end;
42                 
43         };
44         
45         Dist* distCalculator;
46         SequenceDB alignDB;
47
48         string countends, output, fastafile, calc, outputDir, oldfastafile, column, compress;
49
50         int processors, numNewFasta;
51         float cutoff;
52         vector<int> processIDS;   //end line, processid
53         vector<distlinePair> lines;
54         
55         bool abort;
56         vector<string>  Estimators, outputNames; //holds estimators to be used
57         
58         //void m->appendFiles(string, string);
59         void createProcesses(string);
60         int driver(/*Dist*, SequenceDB, */int, int, string, float);
61         int driver(int, int, string, string);
62         
63         #ifdef USE_MPI 
64         int driverMPI(int, int, MPI_File&, float);
65         int driverMPI(int, int, string, unsigned long int&);
66         int driverMPI(int, int, string, unsigned long int&, string);
67         #endif
68         
69         //int convertMatrix(string);
70         bool sanityCheck();
71         //int convertToLowerTriangle(string);
72
73 };
74
75 #endif
76
77
78