set<string> types;
types.insert("fasta");
+ types.insert("summary");
types.insert("accnos");
types.insert("column");
types.insert("design");
if (biomfile != "") { mothurOut("biom=" + biomfile); mothurOutEndLine(); }
if (counttablefile != "") { mothurOut("count=" + counttablefile); mothurOutEndLine(); }
if (processors != "1") { mothurOut("processors=" + processors); mothurOutEndLine(); }
+ if (summaryfile != "") { mothurOut("summary=" + summaryfile); mothurOutEndLine(); }
}
catch(exception& e) {
if (flowfile != "") { return true; }
if (biomfile != "") { return true; }
if (counttablefile != "") { return true; }
+ if (summaryfile != "") { return true; }
if (processors != "1") { return true; }
return hasCurrent;
flowfile = "";
biomfile = "";
counttablefile = "";
+ summaryfile = "";
processors = "1";
}
catch(exception& e) {
}
}
/*********************************************************************************************/
+void MothurOut::mothurOutJustToScreen(string output) {
+ try {
+
+#ifdef USE_MPI
+ int pid;
+ MPI_Comm_rank(MPI_COMM_WORLD, &pid);
+
+ if (pid == 0) { //only one process should output to screen
+#endif
+ logger() << output;
+
+#ifdef USE_MPI
+ }
+#endif
+ }
+ catch(exception& e) {
+ errorOut(e, "MothurOut", "MothurOut");
+ exit(1);
+ }
+}
+/*********************************************************************************************/
void MothurOut::mothurOutEndLine() {
try {
#ifdef USE_MPI
char c = inFASTA.get(); count++;
if (c == '>') {
positions.push_back(count-1);
- //cout << count << endl;
+ if (debug) { mothurOut("[DEBUG]: numSeqs = " + toString(positions.size()) + " count = " + toString(count) + ".\n"); }
}
}
inFASTA.close();
num = positions.size();
-
- /*FILE * pFile;
- long size;
+ if (debug) { mothurOut("[DEBUG]: num = " + toString(num) + ".\n"); }
+ FILE * pFile;
+ unsigned long long size;
//get num bytes in file
pFile = fopen (filename.c_str(),"rb");
fseek (pFile, 0, SEEK_END);
size=ftell (pFile);
fclose (pFile);
- }*/
+ }
- unsigned long long size = positions[(positions.size()-1)];
+ /*unsigned long long size = positions[(positions.size()-1)];
ifstream in;
openInputFile(filename, in);
if(in.eof()) { break; }
else { size++; }
}
- in.close();
-
+ in.close();*/
+
+ if (debug) { mothurOut("[DEBUG]: size = " + toString(size) + ".\n"); }
+
positions.push_back(size);
positions[0] = 0;
/************************************************************/
int MothurOut::checkName(string& name) {
try {
- for (int i = 0; i < name.length(); i++) {
- if (name[i] == ':') { name[i] = '_'; changedSeqNames = true; }
- }
+ if (modifyNames) {
+ for (int i = 0; i < name.length(); i++) {
+ if (name[i] == ':') { name[i] = '_'; changedSeqNames = true; }
+ }
+ }
return 0;
}
catch(exception& e) {