]> git.donarmstrong.com Git - mothur.git/blob - aligncommand.h
adding current file class
[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 #include "mothurfiles.h"
19
20 class AlignCommand : public Command {
21         
22 public:
23         AlignCommand(string);   
24         AlignCommand();
25         ~AlignCommand();
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                 unsigned long int start;
36                 unsigned long int end;
37                 linePair(unsigned long int i, unsigned long int j) : start(i), end(j) {}
38         };
39         vector<int> processIDS;   //processid
40         vector<linePair*> lines;
41         bool MPIWroteAccnos;
42         map<string, vector<string> > outputTypes;
43         
44         AlignmentDB* templateDB;
45         Alignment* alignment;
46         
47         int driver(linePair*, string, string, string, string);
48         int createProcesses(string, string, string, string);
49         void appendAlignFiles(string, string); 
50         void appendReportFiles(string, string);
51         
52         #ifdef USE_MPI
53         int driverMPI(int, int, MPI_File&, MPI_File&, MPI_File&, MPI_File&, vector<unsigned long int>&);
54         #endif
55         
56         string candidateFileName, templateFileName, distanceFileName, search, align, outputDir;
57         float match, misMatch, gapOpen, gapExtend, threshold;
58         int processors, kmerSize;
59         vector<string> candidateFileNames;
60         vector<string> outputNames;
61         
62         bool abort, flip, calledHelp;
63         CurrentFile* currentFiles;
64
65 };
66
67 #endif