- flowData.resize(numFlows);
-
- if (seqName == "") {
- m->mothurOut("Error reading quality file, name blank at position, " + toString(flowFile.tellg()));
- m->mothurOutEndLine();
- }
- else{
- seqName = seqName.substr(1);
- for(int i=0;i<numFlows;i++) { flowFile >> flowData[i]; }
+bool FlowData::getNext(ifstream& flowFile){
+ try {
+
+ seqName = getSequenceName(flowFile);
+ if (m->debug) { m->mothurOut("[DEBUG]: flow = " + seqName + " "); }
+ flowFile >> endFlow;
+ if (m->debug) { m->mothurOut(toString(endFlow) + " "); }
+ if (!m->control_pressed) {
+ if (m->debug) { m->mothurOut(" "); }
+ for(int i=0;i<numFlows;i++) {
+ flowFile >> flowData[i];
+ if (m->debug) { m->mothurOut(toString(flowData[i]) + " "); }
+ }
+ if (m->debug) { m->mothurOut("\n"); }
+ updateEndFlow();
+ translateFlow();
+ m->gobble(flowFile);