outputDir = validParameter.validFile(parameters, "outputdir", false); if (outputDir == "not found"){ outputDir = m->hasPath(fastafile); }
string temp = validParameter.validFile(parameters, "numbases", false); if (temp == "not found") { temp = "0"; }
- convert(temp, numbases);
+ m->mothurConvert(temp, numbases);
temp = validParameter.validFile(parameters, "countgaps", false); if (temp == "not found") { temp = "f"; }
countGaps = m->isTrue(temp);
Sequence seq(in);
- if (m->control_pressed) { outputTypes.clear(); in.close(); out.close(); outAcc.close(); remove(outputFileName.c_str()); remove(outputFileNameAccnos.c_str()); return 0; }
+ if (m->control_pressed) { outputTypes.clear(); in.close(); out.close(); outAcc.close(); m->mothurRemove(outputFileName); m->mothurRemove(outputFileNameAccnos); return 0; }
if (seq.getName() != "") {
string newSeqString = getChopped(seq);
m->mothurOut(outputFileName); m->mothurOutEndLine(); outputNames.push_back(outputFileName); outputTypes["fasta"].push_back(outputFileName);
if (wroteAccnos) { m->mothurOut(outputFileNameAccnos); m->mothurOutEndLine(); outputNames.push_back(outputFileNameAccnos); outputTypes["accnos"].push_back(outputFileNameAccnos); }
- else { remove(outputFileNameAccnos.c_str()); }
+ else { m->mothurRemove(outputFileNameAccnos); }
m->mothurOutEndLine();
for (int i = 0; i < temp.length(); i++) {
//eliminate N's
- if (toupper(temp[i]) == 'N') { temp[i] == '.'; }
+ if (toupper(temp[i]) == 'N') { temp[i] = '.'; }
numBasesCounted++;
}
if (stopSpot == 0) { temp = ""; }
- else { temp = temp.substr(0, stopSpot); }
+ else { temp = temp.substr(0, stopSpot+1); }
}else {
if (!Short) { temp = ""; } //sequence too short
for (int i = (temp.length()-1); i >= 0; i--) {
//eliminate N's
- if (toupper(temp[i]) == 'N') { temp[i] == '.'; }
+ if (toupper(temp[i]) == 'N') { temp[i] = '.'; }
numBasesCounted++;
for (int i = 0; i < temp.length(); i++) {
//eliminate N's
if (toupper(temp[i]) == 'N') {
- temp[i] == '.';
+ temp[i] = '.';
tempLength--;
if (tempLength < numbases) { stopSpot = 0; break; }
}
}
if (stopSpot == 0) { temp = ""; }
- else { temp = temp.substr(0, stopSpot); }
+ else { temp = temp.substr(0, stopSpot+1); }
}else {
if (!Short) { temp = ""; } //sequence too short
for (int i = (temp.length()-1); i >= 0; i--) {
//eliminate N's
if (toupper(temp[i]) == 'N') {
- temp[i] == '.';
+ temp[i] = '.';
tempLength--;
if (tempLength < numbases) { stopSpot = 0; break; }
}
}
if (stopSpot == 0) { temp = ""; }
- else { temp = temp.substr(stopSpot+1); }
+ else { temp = temp.substr(stopSpot); }
}else {
if (!Short) { temp = ""; } //sequence too short
}