- 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]; }
- }
-
- findDeadSpot(signal, noise, maxHomoP);
- translateFlow();
-
- m->gobble(flowFile);
+bool FlowData::getNext(ifstream& flowFile){
+
+ try {
+ flowFile >> seqName >> endFlow;
+ if (seqName.length() != 0) {
+ //cout << "in Flowdata " + seqName << endl;
+ for(int i=0;i<numFlows;i++) { flowFile >> flowData[i]; }
+ //cout << "in Flowdata read " << seqName + " done" << endl;
+ updateEndFlow();
+ translateFlow();
+ m->gobble(flowFile);
+ }else{ m->mothurOut("Error in reading your flowfile, at position " + toString(flowFile.tellg()) + ". Blank name."); m->mothurOutEndLine(); }
+
+ if(flowFile){ return 1; }
+ else { return 0; }