}
if(i % 100 == 0){
- //m->mothurOut(toString(i) + "\t" + toString(time(NULL) - startTime)); m->mothurOutEndLine();
+ m->mothurOut(toString(i) + "\t" + toString(time(NULL) - startTime)); m->mothurOutEndLine();
cout << i << '\t' << (time(NULL) - startTime) << endl;
}
}
- //m->mothurOut(toString(endLine-1) + "\t" + toString(time(NULL) - startTime)); m->mothurOutEndLine();
+ m->mothurOut(toString(endLine-1) + "\t" + toString(time(NULL) - startTime)); m->mothurOutEndLine();
cout << (endLine-1) << '\t' << (time(NULL) - startTime) << endl;
delete distCalculator;
return 1;
if(i % 100 == 0){
- //m->mothurOut(toString(i) + "\t" + toString(time(NULL) - startTime)); m->mothurOutEndLine();
+ m->mothurOut(toString(i) + "\t" + toString(time(NULL) - startTime)); m->mothurOutEndLine();
cout << i << '\t' << (time(NULL) - startTime) << endl;
}
delete buf;
}
- //m->mothurOut(toString(endLine-1) + "\t" + toString(time(NULL) - startTime)); m->mothurOutEndLine();
+ m->mothurOut(toString(endLine-1) + "\t" + toString(time(NULL) - startTime)); m->mothurOutEndLine();
cout << (endLine-1) << '\t' << (time(NULL) - startTime) << endl;
MPI_File_close(&outMPI);
delete distCalculator;
if(i % 100 == 0){
- //m->mothurOut(toString(i) + "\t" + toString(time(NULL) - startTime)); m->mothurOutEndLine();
+ m->mothurOut(toString(i) + "\t" + toString(time(NULL) - startTime)); m->mothurOutEndLine();
cout << i << '\t' << (time(NULL) - startTime) << endl;
}
delete buf;
}
- //m->mothurOut(toString(endLine-1) + "\t" + toString(time(NULL) - startTime)); m->mothurOutEndLine();
+ m->mothurOut(toString(endLine-1) + "\t" + toString(time(NULL) - startTime)); m->mothurOutEndLine();
cout << (endLine-1) << '\t' << (time(NULL) - startTime) << endl;
MPI_File_close(&outMPI);
delete distCalculator;
outputTypes.clear();
return 0;
}
-
+
+
//cluster using cluster classes
while (distMatrix->getSmallDist() < cutoff && distMatrix->getNNodes() > 0){
+ if (m->debug) { cout << "numNodes=" << distMatrix->getNNodes() << " smallDist = " << distMatrix->getSmallDist() << endl; }
+
cluster->update(cutoff);
if (m->control_pressed) {
}
}
}else { m->mothurOut("Error in your blast file, cannot read."); m->mothurOutEndLine(); exit(1); }
-string outDistFilem = "../kathryn/blastDist.dist";
- ofstream outMDist;
- m->openOutputFile(outDistFilem, outMDist);
+
+
//read file
while(!fileHandle.eof()){
PDistCell value(itA->second, distance);
matrix->addCell(it->first, value);
}
- outMDist << itA->first << '\t' << nameMap->get(it->first) << '\t' << distance << endl;
- }else{
+ }else{
outDist << itA->first << '\t' << nameMap->get(it->first) << '\t' << distance << endl;
}
}
ifstream in;
m->openInputFile(blastfile, in);
- ofstream outName;
- m->openOutputFile((blastfile + ".tempOutNames"), outName);
+ //ofstream outName;
+ //m->openOutputFile((blastfile + ".tempOutNames"), outName);
//read first line
in >> prevName;
//is this a new name?
if (name != prevName) {
prevName = name;
- nameMap->push_back(name);
- outName << name << '\t' << name << endl;
+
+ if (nameMap->get(name) != -1) { m->mothurOut("[ERROR]: trying to exact names from blast file, and I found dups. Are you sequence names unique? quitting.\n"); m->control_pressed = true; }
+ else {
+ nameMap->push_back(name);
+ }
+ //outName << name << '\t' << name << endl;
num++;
}
}
ull vcol = 0;
//find the columns entry for this cell as well
- for (int i = 0; i < seqVec[vrow].size(); i++) { if (seqVec[vrow][i].index == row) { vcol = i; break; } }
-
+ for (int i = 0; i < seqVec[vrow].size(); i++) {
+ if (seqVec[vrow][i].index == row) { vcol = i; break; }
+ }
+
seqVec[vrow][vcol].dist = seqVec[row][col].dist;
return 0;
for (int i = 0; i < seqVec.size(); i++) {
for (int j = 0; j < seqVec[i].size(); j++) {
-
+
+ if (m->control_pressed) { return smallDist; }
+
//already checked everyone else in row
if (i < seqVec[i][j].index) {