]> git.donarmstrong.com Git - mothur.git/blobdiff - seqsummarycommand.h
added forward and reverse barcodes to trim.seqs to process illumina seqs
[mothur.git] / seqsummarycommand.h
index a7ccb573490135c10c6fdb7258bb46228047d98b..d8837a374d070298ceb9d224aaf8c621680bf249 100644 (file)
@@ -39,9 +39,9 @@ private:
        map<string, int> nameMap;
        
        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<linePair*> lines;
@@ -51,7 +51,7 @@ private:
        int driverCreateSummary(vector<int>&, vector<int>&, vector<int>&, vector<int>&, vector<int>&, string, string, linePair*);       
 
        #ifdef USE_MPI
-       int MPICreateSummary(int, int, vector<int>&, vector<int>&, vector<int>&, vector<int>&, vector<int>&, MPI_File&, MPI_File&, vector<unsigned long int>&); 
+       int MPICreateSummary(int, int, vector<int>&, vector<int>&, vector<int>&, vector<int>&, vector<int>&, MPI_File&, MPI_File&, vector<unsigned long long>&);        
        #endif
 
 
@@ -61,16 +61,16 @@ private:
 //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 seqSumData {
-       vector<int>* startPosition;
-       vector<int>* endPosition;
-       vector<int>* seqLength; 
-       vector<int>* ambigBases; 
-       vector<int>* longHomoPolymer; 
+struct seqSumData {
+       vector<int> startPosition;
+       vector<int> endPosition;
+       vector<int> seqLength; 
+       vector<int> ambigBases; 
+       vector<int> longHomoPolymer; 
        string filename; 
        string sumFile; 
-       unsigned long int start;
-       unsigned long int end;
+       unsigned long long start;
+       unsigned long long end;
        int count;
        MothurOut* m;
        string namefile;
@@ -78,12 +78,7 @@ typedef struct seqSumData {
        
        
        seqSumData(){}
-       seqSumData(vector<int>* s, vector<int>* e, vector<int>* l, vector<int>* a, vector<int>* h, string f, string sf, MothurOut* mout, unsigned long int st, unsigned long int en, string na, map<string, int> nam) {
-               startPosition = s;
-               endPosition = e;
-               seqLength = l;
-               ambigBases = a;
-               longHomoPolymer = h;
+       seqSumData(string f, string sf, MothurOut* mout, unsigned long long st, unsigned long long en, string na, map<string, int> nam) {
                filename = f;
                sumFile = sf;
                m = mout;
@@ -96,7 +91,7 @@ typedef struct seqSumData {
 };
 
 /**************************************************************************************************/
-#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)
+#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) || (__linux__) || (__unix__) || (__unix)
 #else
 static DWORD WINAPI MySeqSumThreadFunction(LPVOID lpParam){ 
        seqSumData* pDataArray;
@@ -137,11 +132,11 @@ static DWORD WINAPI MySeqSumThreadFunction(LPVOID lpParam){
                                
                                //for each sequence this sequence represents
                                for (int i = 0; i < num; i++) {
-                                       pDataArray->startPosition->push_back(current.getStartPos());
-                                       pDataArray->endPosition->push_back(current.getEndPos());
-                                       pDataArray->seqLength->push_back(current.getNumBases());
-                                       pDataArray->ambigBases->push_back(current.getAmbigBases());
-                                       pDataArray->longHomoPolymer->push_back(current.getLongHomoPolymer());
+                                       pDataArray->startPosition.push_back(current.getStartPos());
+                                       pDataArray->endPosition.push_back(current.getEndPos());
+                                       pDataArray->seqLength.push_back(current.getNumBases());
+                                       pDataArray->ambigBases.push_back(current.getAmbigBases());
+                                       pDataArray->longHomoPolymer.push_back(current.getLongHomoPolymer());
                                }
                                
                                outSummary << current.getName() << '\t';