m->openOutputFile(listFileName, outList);
outputNames.push_back(listFileName); outputTypes["list"].push_back(listFileName);
-
map<float, int>::iterator itLabel;
+
+ //clears out junk for autocompleting of list files above. Perhaps there is a beter way to handle this from within the data structure?
+ m->printedListHeaders = false;
//for each label needed
for(itLabel = userLabels.begin(); itLabel != userLabels.end(); itLabel++) {
rabund->print(outRabund);
}
//outList << endl;
+ if (!m->printedListHeaders) {
+ m->listBinLabelsInFile.clear(); completeList.printHeaders(outList); }
completeList.print(outList);
if (rabund != NULL) { delete rabund; }
//loop through and create all the processes you want
while (process != processors) {
- int pid = fork();
+ pid_t pid = fork();
if (pid > 0) {
processIDS.push_back(pid); //create map from line number to pid so you can append files in correct order later
vector<string> listFileNames = cluster(dividedNames[process], labels);
//write out names to file
- string filename = toString(getpid()) + ".temp";
+ string filename = m->mothurGetpid(process) + ".temp";
ofstream out;
m->openOutputFile(filename, out);
out << tag << endl;
//print out labels
ofstream outLabels;
- filename = toString(getpid()) + ".temp.labels";
+ filename = m->mothurGetpid(process) + ".temp.labels";
m->openOutputFile(filename, outLabels);
outLabels << cutoff << endl;
cluster->readPhylipFile(thisDistFile, nameMap);
}else if (countfile != "") {
ct = new CountTable();
- ct->readTable(thisNamefile, false);
+ ct->readTable(thisNamefile, false, false);
cluster->readPhylipFile(thisDistFile, ct);
}
tag = cluster->getTag();
read->read(nameMap);
}else if (countfile != "") {
ct = new CountTable();
- ct->readTable(thisNamefile, false);
+ ct->readTable(thisNamefile, false, false);
read->read(ct);
}else { read->read(nameMap); }