]> git.donarmstrong.com Git - mothur.git/blob - chimeraccodecommand.h
changed how we break up the files on parallelized commands to avoid scanning file.
[mothur.git] / chimeraccodecommand.h
1 #ifndef CHIMERACCODECOMMAND_H
2 #define CHIMERACCODECOMMAND_H
3
4 /*
5  *  chimeraccodecommand.h
6  *  Mothur
7  *
8  *  Created by westcott on 3/30/10.
9  *  Copyright 2010 Schloss Lab. All rights reserved.
10  *
11  */
12
13 #include "mothur.h"
14 #include "command.hpp"
15 #include "chimera.h"
16
17
18 /***********************************************************/
19
20 class ChimeraCcodeCommand : public Command {
21 public:
22         ChimeraCcodeCommand(string);
23         ~ChimeraCcodeCommand();
24         int execute();
25         void help();
26         
27                 
28 private:
29         struct linePair {
30                 unsigned long int start;
31                 unsigned long int end;
32                 linePair(unsigned long int i, unsigned long int j) : start(i), end(j) {}
33         };
34         vector<int> processIDS;   //processid
35         vector<linePair*> lines;
36         
37         int driver(linePair*, string, string, string);
38         int createProcesses(string, string, string);
39         
40         #ifdef USE_MPI
41         int driverMPI(int, int, MPI_File&, MPI_File&, MPI_File&, vector<unsigned long int>&);
42         #endif
43
44         bool abort, filter;
45         string fastafile, templatefile, outputDir, maskfile;
46         int processors, window, numwanted, numSeqs, templateSeqsLength;
47         Chimera* chimera;
48         vector<string> fastaFileNames;
49         vector<string> outputNames;
50         
51         
52 };
53
54 /***********************************************************/
55
56 #endif
57