if (sharedfile != "") { mothurOut("shared=" + sharedfile); mothurOutEndLine(); }
if (taxonomyfile != "") { mothurOut("taxonomy=" + taxonomyfile); mothurOutEndLine(); }
if (treefile != "") { mothurOut("tree=" + treefile); mothurOutEndLine(); }
+ if (flowfile != "") { mothurOut("flow=" + flowfile); mothurOutEndLine(); }
+ if (processors != "1") { mothurOut("processors=" + processors); mothurOutEndLine(); }
}
catch(exception& e) {
if (sharedfile != "") { return true; }
if (taxonomyfile != "") { return true; }
if (treefile != "") { return true; }
+ if (flowfile != "") { return true; }
+ if (processors != "1") { return true; }
return hasCurrent;
sfffile = "";
oligosfile = "";
accnosfile = "";
- taxonomyfile = "";
+ taxonomyfile = "";
+ flowfile = "";
+ processors = "1";
}
catch(exception& e) {
errorOut(e, "MothurOut", "clearCurrentFiles");
exit(1);
}
}
+/**********************************************************************************************************************/
+int MothurOut::readNames(string namefile, vector<seqPriorityNode>& nameVector, map<string, string>& fastamap) {
+ try {
+ int error = 0;
+
+ //open input file
+ ifstream in;
+ openInputFile(namefile, in);
+
+ while (!in.eof()) {
+ if (control_pressed) { break; }
+
+ string firstCol, secondCol;
+ in >> firstCol >> secondCol; gobble(in);
+
+ int num = getNumNames(secondCol);
+
+ map<string, string>::iterator it = fastamap.find(firstCol);
+ if (it == fastamap.end()) {
+ error = 1;
+ mothurOut("[ERROR]: " + firstCol + " is not in your fastafile, but is in your namesfile, please correct."); mothurOutEndLine();
+ }else {
+ seqPriorityNode temp(num, it->second, firstCol);
+ nameVector.push_back(temp);
+ }
+ }
+ in.close();
+
+ return error;
+
+ }
+ catch(exception& e) {
+ errorOut(e, "MothurOut", "readNames");
+ exit(1);
+ }
+}
/***********************************************************************/