+string Sequence::getSequenceName(ifstream& fastaFile) {
+ try {
+ string name = "";
+
+ fastaFile >> name;
+
+ if (name.length() != 0) {
+
+ name = name.substr(1);
+
+ for (int i = 0; i < name.length(); i++) {
+ if (name[i] == ':') { name[i] = '_'; m->changedSeqNames = true; }
+ }
+
+ }else{ m->mothurOut("Error in reading your fastafile, at position " + toString(fastaFile.tellg()) + ". Blank name."); m->mothurOutEndLine(); m->control_pressed = true; }
+
+ return name;
+ }
+ catch(exception& e) {
+ m->errorOut(e, "Sequence", "getSequenceName");
+ exit(1);
+ }
+}
+//********************************************************************************************************************
+string Sequence::getSequenceName(istringstream& fastaFile) {
+ try {
+ string name = "";
+
+ fastaFile >> name;
+
+ if (name.length() != 0) {
+
+ name = name.substr(1);
+
+ for (int i = 0; i < name.length(); i++) {
+ if (name[i] == ':') { name[i] = '_'; m->changedSeqNames = true; }
+ }
+
+ }else{ m->mothurOut("Error in reading your fastafile, at position " + toString(fastaFile.tellg()) + ". Blank name."); m->mothurOutEndLine(); m->control_pressed = true; }
+
+ return name;
+ }
+ catch(exception& e) {
+ m->errorOut(e, "Sequence", "getSequenceName");
+ exit(1);
+ }
+}
+//********************************************************************************************************************
+string Sequence::getSequenceString(ifstream& fastaFile, int& numAmbig) {