#ifndef ALIGNCOMMAND_H
#define ALIGNCOMMAND_H
-
+//test
/*
* aligncommand.h
* Mothur
*
*/
-#include "mothur.h"
#include "command.hpp"
#include "database.hpp"
#include "alignment.hpp"
#include "nast.hpp"
#include "nastreport.hpp"
-
+//test
class AlignCommand : public Command {
public:
private:
struct linePair {
- unsigned long int start;
- unsigned long int end;
- linePair(unsigned long int i, unsigned long int j) : start(i), end(j) {}
+ unsigned long long start;
+ unsigned long long end;
+ linePair(unsigned long long i, unsigned long long j) : start(i), end(j) {}
};
vector<int> processIDS; //processid
vector<linePair*> lines;
void appendReportFiles(string, string);
#ifdef USE_MPI
- int driverMPI(int, int, MPI_File&, MPI_File&, MPI_File&, MPI_File&, vector<unsigned long int>&);
+ int driverMPI(int, int, MPI_File&, MPI_File&, MPI_File&, MPI_File&, vector<unsigned long long>&);
#endif
string candidateFileName, templateFileName, distanceFileName, search, align, outputDir;
//custom data structure for threads to use.
// This is passed by void pointer so it can be any data type
// that can be passed using a single void pointer (LPVOID).
-typedef struct alignData {
+struct alignData {
+ string templateFileName;
string alignFName;
string reportFName;
string accnosFName;
string align;
string search;
bool flip;
- unsigned long int start;
- unsigned long int end;
+ unsigned long long start;
+ unsigned long long end;
MothurOut* m;
//AlignmentDB* templateDB;
float match, misMatch, gapOpen, gapExtend, threshold;
- int count, kmerSize;
+ int count, kmerSize, threadID;
alignData(){}
- alignData(string a, string r, string ac, string f, string al, string se, int ks, MothurOut* mout, unsigned long int st, unsigned long int en, bool fl, float ma, float misMa, float gapO, float gapE, float thr) {
+ alignData(string te, string a, string r, string ac, string f, string al, string se, int ks, MothurOut* mout, unsigned long long st, unsigned long long en, bool fl, float ma, float misMa, float gapO, float gapE, float thr, int tid) {
+ templateFileName = te;
alignFName = a;
reportFName = r;
accnosFName = ac;
search = se;
count = 0;
kmerSize = ks;
+ threadID = tid;
}
};
/**************************************************************************************************/
-#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)
+#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) || (__linux__) || (__unix__) || (__unix)
#else
static DWORD WINAPI MyAlignThreadFunction(LPVOID lpParam){
alignData* pDataArray;
pDataArray->count = pDataArray->end;
- AlignmentDB* templateDB = new AlignmentDB("saved-silent", pDataArray->search, pDataArray->kmerSize, pDataArray->gapOpen, pDataArray->gapExtend, pDataArray->match, pDataArray->misMatch);
+ AlignmentDB* templateDB = new AlignmentDB(pDataArray->templateFileName, pDataArray->search, pDataArray->kmerSize, pDataArray->gapOpen, pDataArray->gapExtend, pDataArray->match, pDataArray->misMatch, pDataArray->threadID);
//moved this into driver to avoid deep copies in windows paralellized version
Alignment* alignment;