]> git.donarmstrong.com Git - mothur.git/blob - filterseqscommand.h
modified mpi code to save ram by writing out every 10 seqs.
[mothur.git] / filterseqscommand.h
1 #ifndef FILTERSEQSCOMMAND_H
2 #define FILTERSEQSCOMMAND_H
3
4 /*
5  *  filterseqscommand.h
6  *  Mothur
7  *
8  *  Created by Thomas Ryabin on 5/4/09.
9  *  Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved.
10  *
11  */
12
13 #include "command.hpp"
14 #include "filters.h"
15 #include "mpi.h"
16
17 class Sequence;
18 class FilterSeqsCommand : public Command {
19
20 public:
21         FilterSeqsCommand(string);
22         ~FilterSeqsCommand() {};
23         int execute();  
24         void help();
25         
26 private:
27         struct linePair {
28                 int start;
29                 int numSeqs;
30                 linePair(long int i, int j) : start(i), numSeqs(j) {}
31         };
32         vector<linePair*> lines;
33
34
35         string vertical, filter, fasta, hard, outputDir, filterFileName;
36         vector<string> fastafileNames;  
37         int alignmentLength, processors;
38         vector<int> bufferSizes;
39
40         char trump;
41         bool abort;
42         float soft;
43         int numSeqs;
44         
45         string createFilter();
46         int createProcessesCreateFilter(Filters&, string);
47         int driverCreateFilter(Filters&, string, linePair*);
48         int MPICreateFilter(Filters&, string);  
49         int setLines(string);
50         int parseBuffer(string, vector<string>&);
51         
52 };
53
54 #endif