]> git.donarmstrong.com Git - mothur.git/blobdiff - alignmentdb.cpp
cleaned up code2
[mothur.git] / alignmentdb.cpp
index 57975d6d774a97b1d171b468c7a238158a7b0ebe..f59c5db7d6e6ef2d039ccdda8b48a6ea3fb6428a 100644 (file)
 #include "blastdb.hpp"
 #include "referencedb.h"
 
-/**************************************************************************************************/
-//deep copy
-AlignmentDB::AlignmentDB(const AlignmentDB& adb) : numSeqs(adb.numSeqs), longest(adb.longest), method(adb.method), emptySequence(adb.emptySequence), threadID(adb.threadID) {
-       try {
-               
-               m = MothurOut::getInstance();
-               if (adb.method == "blast") {
-                       search = new BlastDB(*((BlastDB*)adb.search));
-               }else if(adb.method == "kmer") {
-                       search = new KmerDB(*((KmerDB*)adb.search));
-               }else if(adb.method == "suffix") {
-                       search = new SuffixDB(*((SuffixDB*)adb.search));
-               }else {
-                       m->mothurOut("[ERROR]: cannot create copy of alignment database, unrecognized method - " + adb.method); m->mothurOutEndLine();
-               }
-               
-               for (int i = 0; i < adb.templateSequences.size(); i++) {
-                       Sequence temp(adb.templateSequences[i]);
-                       templateSequences.push_back(temp);
-               }
-       }
-       catch(exception& e) {
-               m->errorOut(e, "AlignmentDB", "AlignmentDB");
-               exit(1);
-       }
-       
-}
 /**************************************************************************************************/
 AlignmentDB::AlignmentDB(string fastaFileName, string s, int kmerSize, float gapOpen, float gapExtend, float match, float misMatch, int tid){          //      This assumes that the template database is in fasta format, may 
        try {                                                                                   //      need to alter this in the future?
@@ -77,7 +50,7 @@ AlignmentDB::AlignmentDB(string fastaFileName, string s, int kmerSize, float gap
                        
                        #ifdef USE_MPI  
                                int pid, processors;
-                               vector<unsigned long int> positions;
+                               vector<unsigned long long> positions;
                        
                                MPI_Status status; 
                                MPI_File inMPI;