}
}
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.");
m->mothurOut("Generating search database... "); cout.flush();
#ifdef USE_MPI
int pid, processors;
- vector<unsigned long int> positions;
+ vector<unsigned long long> positions;
int tag = 2001;
MPI_Status status;
//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();
}
}
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.");
}
}
/**************************************************************************************************/
-Classify::Classify() { m = MothurOut::getInstance(); database = NULL; }
+Classify::Classify() { m = MothurOut::getInstance(); database = NULL; flipped=false; }
/**************************************************************************************************/
int Classify::readTaxonomy(string file) {
m->mothurOutEndLine();
m->mothurOut("Reading in the " + file + " taxonomy...\t"); cout.flush();
-
+ if (m->debug) { m->mothurOut("[DEBUG]: Taxonomies read in...\n"); }
+
#ifdef USE_MPI
int pid, num, processors;
- vector<unsigned long int> positions;
+ vector<unsigned long long> positions;
int tag = 2001;
MPI_Status status;
delete buf4;
istringstream iss (tempBuf,istringstream::in);
- iss >> name >> taxInfo;
+ iss >> name; m->gobble(iss);
+ iss >> taxInfo;
+ if (m->debug) { m->mothurOut("[DEBUG]: name = " + name + " tax = " + taxInfo + "\n"); }
taxonomy[name] = taxInfo;
phyloTree->addSeqToTree(name, taxInfo);
}
MPI_File_close(&inMPI);
MPI_Barrier(MPI_COMM_WORLD); //make everyone wait - just in case
-#else
- ifstream inTax;
- m->openInputFile(file, inTax);
-
- //read template seqs and save
- while (!inTax.eof()) {
- inTax >> name >> taxInfo;
-
- taxonomy[name] = taxInfo;
-
- phyloTree->addSeqToTree(name, taxInfo);
-
- m->gobble(inTax);
- }
- inTax.close();
+#else
+
+ taxonomy.clear();
+ m->readTax(file, taxonomy);
+ for (map<string, string>::iterator itTax = taxonomy.begin(); itTax != taxonomy.end(); itTax++) { phyloTree->addSeqToTree(itTax->first, itTax->second); }
#endif
-
phyloTree->assignHeirarchyIDs(0);
phyloTree->setUp(file);