string scrapSeqFile = outputDir + m->getRootName(m->getSimpleName(fastaFile)) + "scrap.fasta";
outputNames.push_back(scrapSeqFile);
string trimQualFile = outputDir + m->getRootName(m->getSimpleName(fastaFile)) + "trim.qual";
- outputNames.push_back(trimQualFile);
string scrapQualFile = outputDir + m->getRootName(m->getSimpleName(fastaFile)) + "scrap.qual";
- outputNames.push_back(scrapQualFile);
+ if (qFileName != "") { outputNames.push_back(trimQualFile); outputNames.push_back(scrapQualFile); }
string groupFile = outputDir + m->getRootName(m->getSimpleName(fastaFile)) + "groups";
vector<string> fastaFileNames;
vector<ofstream*> fastaFileNames;
vector<ofstream*> qualFileNames;
- cout << "here" << endl;
if (oligoFile != "") {
m->openOutputFile(groupFile, outGroups);
for (int i = 0; i < fastaNames.size(); i++) {
+
#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)
fastaFileNames.push_back(new ofstream((fastaNames[i] + toString(getpid()) + ".temp").c_str(), ios::ate));
if(qFileName != ""){
#endif
}
}
-cout << "here " << filename << endl;
+
ifstream inFASTA;
m->openInputFile(filename, inFASTA);
inFASTA.seekg(line->start);
- cout << "here " << qFileName << endl;
+
ifstream qFile;
if(qFileName != "") { m->openInputFile(qFileName, qFile); qFile.seekg(qline->start); }
bool done = false;
int count = 0;
- cout << "here" << endl;
+
while (!done) {
if (m->control_pressed) {
count++;
}
- unsigned long int pos = inFASTA.tellg();
- if ((pos == -1) || (pos >= line->end)) { break; }
-
+ #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)
+ unsigned long int pos = inFASTA.tellg();
+ if ((pos == -1) || (pos >= line->end)) { break; }
+ #else
+ if (inFASTA.eof()) { break; }
+ #endif
+
//report progress
if((count) % 1000 == 0){ m->mothurOut(toString(count)); m->mothurOutEndLine(); }