initialize();
name = newName;
- for (int i = 0; i < name.length(); i++) {
- if (name[i] == ':') { name[i] = '_'; m->changedSeqNames = true; }
- }
+ m->checkName(name);
//setUnaligned removes any gap characters for us
setUnaligned(sequence);
initialize();
name = newName;
- for (int i = 0; i < name.length(); i++) {
- if (name[i] == ':') { name[i] = '_'; m->changedSeqNames = true; }
- }
+ m->checkName(name);
//setUnaligned removes any gap characters for us
setUnaligned(sequence);
//read info after sequence name
while (!fastaFile.eof()) {
char c = fastaFile.get();
- if (c == 10 || c == 13){ break; }
+ if (c == 10 || c == 13 || c == -1){ break; }
extraInfo += c;
}
name = name.substr(1);
- for (int i = 0; i < name.length(); i++) {
- if (name[i] == ':') { name[i] = '_'; m->changedSeqNames = true; }
- }
+ m->checkName(name);
}else{ m->mothurOut("Error in reading your fastafile, at position " + toString(fastaFile.tellg()) + ". Blank name."); m->mothurOutEndLine(); m->control_pressed = true; }
name = name.substr(1);
- for (int i = 0; i < name.length(); i++) {
- if (name[i] == ':') { name[i] = '_'; m->changedSeqNames = true; }
- }
+ m->checkName(name);
}else{ m->mothurOut("Error in reading your fastafile, at position " + toString(fastaFile.tellg()) + ". Blank name."); m->mothurOutEndLine(); m->control_pressed = true; }
if (start > aligned.length()) { start = aligned.length(); m->mothurOut("[ERROR]: start to large.\n"); }
- for(int j = 0; j < start-1; j++) {
+ for(int j = 0; j < start; j++) {
aligned[j] = '.';
}
//things like ......----------AT become ................AT
- for(int j = start-1; j < aligned.length(); j++) {
+ for(int j = start; j < aligned.length(); j++) {
if (isalpha(aligned[j])) { break; }
else { aligned[j] = '.'; }
}