X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=classify.cpp;h=2d01183479a504c798a18071df045f723643f850;hb=e339f9008daa7d37c9a9034829565620a6abe783;hp=4c6c6d8c8f0d628653ff772a367b07cdbadecced;hpb=fc1ed1ae1b022719176910ab71993bd6535810ad;p=mothur.git diff --git a/classify.cpp b/classify.cpp index 4c6c6d8..2d01183 100644 --- a/classify.cpp +++ b/classify.cpp @@ -47,7 +47,7 @@ void Classify::generateDatabaseAndNames(string tfile, string tempFile, string me } } else if(method == "suffix") { database = new SuffixDB(numSeqs); } - else if(method == "blast") { database = new BlastDB(tempFile.substr(0,tempFile.find_last_of(".")+1), gapOpen, gapExtend, match, misMatch, ""); } + else if(method == "blast") { database = new BlastDB(tempFile.substr(0,tempFile.find_last_of(".")+1), gapOpen, gapExtend, match, misMatch, "", threadID); } else if(method == "distance") { database = new DistanceDB(); } else { m->mothurOut(method + " is not a valid search option. I will run the command using kmer, ksize=8."); @@ -89,7 +89,7 @@ void Classify::generateDatabaseAndNames(string tfile, string tempFile, string me m->mothurOut("Generating search database... "); cout.flush(); #ifdef USE_MPI int pid, processors; - vector positions; + vector positions; int tag = 2001; MPI_Status status; @@ -123,7 +123,7 @@ void Classify::generateDatabaseAndNames(string tfile, string tempFile, string me //create database if(method == "kmer") { database = new KmerDB(tempFile, kmerSize); } else if(method == "suffix") { database = new SuffixDB(numSeqs); } - else if(method == "blast") { database = new BlastDB(tempFile.substr(0,tempFile.find_last_of(".")+1), gapOpen, gapExtend, match, misMatch, ""); } + else if(method == "blast") { database = new BlastDB(tempFile.substr(0,tempFile.find_last_of(".")+1), gapOpen, gapExtend, match, misMatch, "", pid); } else if(method == "distance") { database = new DistanceDB(); } else { m->mothurOut(method + " is not a valid search option. I will run the command using kmer, ksize=8."); m->mothurOutEndLine(); @@ -176,7 +176,7 @@ void Classify::generateDatabaseAndNames(string tfile, string tempFile, string me } } else if(method == "suffix") { database = new SuffixDB(numSeqs); } - else if(method == "blast") { database = new BlastDB(tempFile.substr(0,tempFile.find_last_of(".")+1), gapOpen, gapExtend, match, misMatch, ""); } + else if(method == "blast") { database = new BlastDB(tempFile.substr(0,tempFile.find_last_of(".")+1), gapOpen, gapExtend, match, misMatch, "", threadID); } else if(method == "distance") { database = new DistanceDB(); } else { m->mothurOut(method + " is not a valid search option. I will run the command using kmer, ksize=8."); @@ -238,7 +238,7 @@ void Classify::generateDatabaseAndNames(string tfile, string tempFile, string me } } /**************************************************************************************************/ -Classify::Classify() { m = MothurOut::getInstance(); database = NULL; } +Classify::Classify() { m = MothurOut::getInstance(); database = NULL; flipped=false; } /**************************************************************************************************/ int Classify::readTaxonomy(string file) { @@ -252,7 +252,7 @@ int Classify::readTaxonomy(string file) { #ifdef USE_MPI int pid, num, processors; - vector positions; + vector positions; int tag = 2001; MPI_Status status; @@ -296,7 +296,8 @@ int Classify::readTaxonomy(string file) { delete buf4; istringstream iss (tempBuf,istringstream::in); - iss >> name >> taxInfo; + iss >> name; m->gobble(iss); + iss >> taxInfo; taxonomy[name] = taxInfo; phyloTree->addSeqToTree(name, taxInfo); } @@ -309,8 +310,9 @@ int Classify::readTaxonomy(string file) { //read template seqs and save while (!inTax.eof()) { - inTax >> name >> taxInfo; - + inTax >> name; m->gobble(inTax); + inTax >> taxInfo; + taxonomy[name] = taxInfo; phyloTree->addSeqToTree(name, taxInfo);