]> git.donarmstrong.com Git - mothur.git/blobdiff - filterseqscommand.h
finished mpi for filter.seqs
[mothur.git] / filterseqscommand.h
index fffa45770cde70da74792b6bab1feb105b0bd1d5..1d2526fdca83114dcca76217917324d134bcc391 100644 (file)
@@ -6,43 +6,54 @@
  *  Mothur
  *
  *  Created by Thomas Ryabin on 5/4/09.
- *  Copyright 2009 __MyCompanyName__. All rights reserved.
+ *  Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved.
  *
  */
 
 #include "command.hpp"
-#include "mothur.h"
-#include "globaldata.hpp"
-#include "readfasta.h"
-#include "readnexus.h"
-#include "readclustal.h"
-#include "readseqsphylip.h"
-
-using namespace std;
+#include "filters.h"
+#include "mpi.h"
 
+class Sequence;
 class FilterSeqsCommand : public Command {
 
 public:
-       FilterSeqsCommand() {};
+       FilterSeqsCommand(string);
        ~FilterSeqsCommand() {};
        int execute();  
+       void help();
        
 private:
-       void doTrump();
-       void doSoft();
-       void doFilter();
-       
-       GlobalData* globaldata;
-       string filename, trump, filter;
+       struct linePair {
+               int start;
+               int num;
+               linePair(long int i, long int j) : start(i), num(j) {}
+       };
+       vector<linePair*> lines;
+       vector<int> processIDS;
+
+       string vertical, filter, fasta, hard, outputDir, filterFileName;
+       vector<string> fastafileNames;  
+       int alignmentLength, processors;
+       vector<int> bufferSizes;
+       vector<string> outputNames;
+
+       char trump;
+       bool abort;
+       float soft;
+       int numSeqs;
        
-       ReadFasta* readFasta;
-       ReadNexus* readNexus;
-       ReadClustal* readClustal;
-       ReadPhylip* readPhylip;
+       string createFilter();
+       int filterSequences();
+       int createProcessesCreateFilter(Filters&, string);
+       int createProcessesRunFilter(string, string);
+       int driverCreateFilter(Filters&, string, linePair*);
+       int driverRunFilter(string, string, string, linePair*); 
+       int driverMPIRun(istringstream&, MPI_File&);
+       int MPICreateFilter(Filters&, string);  
+       int setLines(string);
+       int parseBuffer(string, vector<string>&);
        
-       vector<bool> columnsToRemove;
-       SequenceDB* db;
-       double soft;
 };
 
-#endif
\ No newline at end of file
+#endif