// ...at some point should added some additional type checking...
string temp;
temp = validParameter.validFile(parameters, "start", false); if (temp == "not found") { temp = "-1"; }
- convert(temp, startPos);
+ m->mothurConvert(temp, startPos);
temp = validParameter.validFile(parameters, "end", false); if (temp == "not found") { temp = "-1"; }
- convert(temp, endPos);
+ m->mothurConvert(temp, endPos);
temp = validParameter.validFile(parameters, "maxambig", false); if (temp == "not found") { temp = "-1"; }
- convert(temp, maxAmbig);
+ m->mothurConvert(temp, maxAmbig);
temp = validParameter.validFile(parameters, "maxhomop", false); if (temp == "not found") { temp = "-1"; }
- convert(temp, maxHomoP);
+ m->mothurConvert(temp, maxHomoP);
temp = validParameter.validFile(parameters, "minlength", false); if (temp == "not found") { temp = "-1"; }
- convert(temp, minLength);
+ m->mothurConvert(temp, minLength);
temp = validParameter.validFile(parameters, "maxlength", false); if (temp == "not found") { temp = "-1"; }
- convert(temp, maxLength);
+ m->mothurConvert(temp, maxLength);
temp = validParameter.validFile(parameters, "processors", false); if (temp == "not found"){ temp = m->getProcessors(); }
m->setProcessors(temp);
- convert(temp, processors);
+ m->mothurConvert(temp, processors);
temp = validParameter.validFile(parameters, "optimize", false); //optimizing trumps the optimized values original value
if (temp == "not found"){ temp = "none"; }
if (optimize.size() == 1) { if (optimize[0] == "none") { optimize.clear(); } }
temp = validParameter.validFile(parameters, "criteria", false); if (temp == "not found"){ temp = "90"; }
- convert(temp, criteria);
+ m->mothurConvert(temp, criteria);
+
+ if (namefile == "") {
+ vector<string> files; files.push_back(fastafile);
+ parser.getNameFile(files);
+ }
}
}
getSummary(positions);
}
else {
+ #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)
positions = m->divideFile(fastafile, processors);
for (int i = 0; i < (positions.size()-1); i++) {
lines.push_back(new linePair(positions[i], positions[(i+1)]));
- }
+ }
+ #else
+ positions.push_back(0); positions.push_back(1000);
+ lines.push_back(new linePair(0, 1000));
+ #endif
}
string goodSeqFile = outputDir + m->getRootName(m->getSimpleName(fastafile)) + "good" + m->getExtension(fastafile);
vector<int> ambigBases;
vector<int> longHomoPolymer;
+#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)
vector<unsigned long long> positions = m->divideFile(fastafile, processors);
-
+
for (int i = 0; i < (positions.size()-1); i++) {
lines.push_back(new linePair(positions[i], positions[(i+1)]));
}
-
+#else
+ lines.push_back(new linePair(0, 1000));
+#endif
#ifdef USE_MPI
int pid;
count++;
}
-
+ //if((count) % 100 == 0){ m->mothurOut("Optimizing sequence: " + toString(count)); m->mothurOutEndLine(); }
#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)
unsigned long long pos = in.tellg();
if ((pos == -1) || (pos >= filePos->end)) { break; }