*
*/
+#include "mothur.h"
#include "command.hpp"
-#include "globaldata.hpp"
-
-
+#include "database.hpp"
+#include "alignment.hpp"
+#include "alignmentdb.h"
class AlignCommand : public Command {
~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;
+ int numSeqs;
+ linePair(unsigned long int i, int j) : start(i), numSeqs(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(int, int, 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