]> git.donarmstrong.com Git - mothur.git/blob - aligncommand.h
added set.current and get.current commands and modified existing commands to update...
[mothur.git] / aligncommand.h
1 #ifndef ALIGNCOMMAND_H
2 #define ALIGNCOMMAND_H
3
4 /*
5  *  aligncommand.h
6  *  Mothur
7  *
8  *  Created by Sarah Westcott on 5/15/09.
9  *  Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved.
10  *
11  */
12
13 #include "mothur.h"
14 #include "command.hpp"
15 #include "database.hpp"
16 #include "alignment.hpp"
17 #include "alignmentdb.h"
18
19 class AlignCommand : public Command {
20         
21 public:
22         AlignCommand(string);   
23         AlignCommand();
24         ~AlignCommand();
25         vector<string> getRequiredParameters();
26         vector<string> getValidParameters();
27         vector<string> getRequiredFiles();
28         map<string, vector<string> > getOutputFiles() { return outputTypes; }
29         int execute(); 
30         void help();    
31         
32 private:
33         struct linePair {
34                 unsigned long int start;
35                 unsigned long int end;
36                 linePair(unsigned long int i, unsigned long int j) : start(i), end(j) {}
37         };
38         vector<int> processIDS;   //processid
39         vector<linePair*> lines;
40         bool MPIWroteAccnos;
41         map<string, vector<string> > outputTypes;
42         
43         AlignmentDB* templateDB;
44         Alignment* alignment;
45         
46         int driver(linePair*, string, string, string, string);
47         int createProcesses(string, string, string, string);
48         void appendAlignFiles(string, string); 
49         void appendReportFiles(string, string);
50         
51         #ifdef USE_MPI
52         int driverMPI(int, int, MPI_File&, MPI_File&, MPI_File&, MPI_File&, vector<unsigned long int>&);
53         #endif
54         
55         string candidateFileName, templateFileName, distanceFileName, search, align, outputDir;
56         float match, misMatch, gapOpen, gapExtend, threshold;
57         int processors, kmerSize;
58         vector<string> candidateFileNames;
59         vector<string> outputNames;
60         
61         bool abort, flip, calledHelp;
62
63 };
64
65 #endif