]> git.donarmstrong.com Git - mothur.git/blobdiff - flowdata.cpp
changes while testing 1.27
[mothur.git] / flowdata.cpp
index 1420f84b992a54ed6dfb6d3a28d8452a083691de..1fe7d7faf1e31ee486890980c4731ddebfdca8fb 100644 (file)
@@ -43,13 +43,15 @@ bool FlowData::getNext(ifstream& flowFile){
        
        try {
                flowFile >> seqName >> endFlow; 
-               //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);
+        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;       }
        }