]> git.donarmstrong.com Git - mothur.git/blobdiff - aligncommand.h
changed how we break up the files on parallelized commands to avoid scanning file.
[mothur.git] / aligncommand.h
index a3ec827c80e1dfa229bf228eb45df61499aef265..b58c3f29bcc653e48c2d30fc9ae4a57344c4330e 100644 (file)
  *
  */
 
+#include "mothur.h"
 #include "command.hpp"
-#include "globaldata.hpp"
-
-
+#include "database.hpp"
+#include "alignment.hpp"
+#include "alignmentdb.h"
 
 class AlignCommand : public Command {
        
@@ -22,23 +23,35 @@ public:
        ~AlignCommand();
        int execute(); 
        void help();    
-
+       
 private:
-       GlobalData* globaldata;
-       OptionParser* parser;
-       map<string, string> parameters;
-       map<string, string>::iterator it;
-       bool abort;
-       string candidateFileName, templateFileName, distanceFileName, search, align;
-       int kmerSize;
-       float match, misMatch, gapOpen, gapExtend;
-       ofstream out;
-       ifstream in;
-       int ableToOpen;
+       struct linePair {
+               unsigned long int start;
+               unsigned long int end;
+               linePair(unsigned long int i, unsigned long int j) : start(i), end(j) {}
+       };
+       vector<int> processIDS;   //processid
+       vector<linePair*> lines;
+       bool MPIWroteAccnos;
        
-
+       AlignmentDB* templateDB;
+       Alignment* alignment;
+       
+       int driver(linePair*, string, string, string, string);
+       int createProcesses(string, string, string, string);
+       void appendAlignFiles(string, string); 
+       void appendReportFiles(string, string);
+       
+       #ifdef USE_MPI
+       int driverMPI(MPI_File&, MPI_File&, MPI_File&, MPI_File&, vector<unsigned long int>&);
+       #endif
+       
+       string candidateFileName, templateFileName, distanceFileName, search, align, outputDir;
+       float match, misMatch, gapOpen, gapExtend, threshold;
+       int processors, kmerSize;
+       vector<string> candidateFileNames;
+       
+       bool abort, flip;
 };
 
-
-
-#endif
\ No newline at end of file
+#endif