]> git.donarmstrong.com Git - mothur.git/blobdiff - inputdata.cpp
fixes while testing 1.33.0
[mothur.git] / inputdata.cpp
index ec23955513f42c218ed750be5471eb23ee08cd40..c9142b7a356de09f0fddd89ae5f415993f4795c3 100644 (file)
@@ -19,7 +19,6 @@ InputData::InputData(string fName, string f) : format(f){
        m->openInputFile(fName, fileHandle);
        filename = fName;
        m->saveNextLabel = "";
-       
 }
 /***********************************************************************/
 
@@ -48,6 +47,8 @@ InputData::InputData(string fName, string orderFileName, string f) : format(f){
                ofHandle.close();
        
                m->openInputFile(fName, fileHandle);
+               m->saveNextLabel = "";
+               
        }
        catch(exception& e) {
                m->errorOut(e, "InputData", "InputData");
@@ -82,6 +83,7 @@ ListVector* InputData::getListVector(string label){
                ifstream in;
                string  thisLabel;
                m->openInputFile(filename, in);
+        m->saveNextLabel = "";
                
                if(in){
 
@@ -118,6 +120,7 @@ ListVector* InputData::getListVector(string label, bool resetFP){
                string  thisLabel;
                fileHandle.clear();
                fileHandle.seekg(0);
+        m->saveNextLabel = "";
                
                if(fileHandle){
 
@@ -238,6 +241,7 @@ SharedOrderVector* InputData::getSharedOrderVector(string label){
                ifstream in;
                string  thisLabel;
                m->openInputFile(filename, in);
+        m->saveNextLabel = "";
                
                if(in){
 
@@ -292,7 +296,7 @@ OrderVector* InputData::getOrderVector(){
                        else if(format == "sabund"){
                                input = new SAbundVector(fileHandle);
                        }
-                       
+                                               
                        m->gobble(fileHandle);
                        
                        output = new OrderVector();     
@@ -320,7 +324,7 @@ OrderVector* InputData::getOrderVector(string label){
                
                if(in){
                        if((format == "list") || (format == "listorder")) {
-                       
+                m->saveNextLabel = "";
                                while (in.eof() != true) {
                                        
                                        input = new ListVector(in);
@@ -334,7 +338,7 @@ OrderVector* InputData::getOrderVector(string label){
                                }
                        }
                        else if (format == "shared")  {
-                               
+                               m->saveNextLabel = "";
                                while (in.eof() != true) {
                                        
                                        input = new SharedListVector(in);
@@ -394,7 +398,7 @@ OrderVector* InputData::getOrderVector(string label){
                                }
 
                        }
-                       
+                                               
                        in.close();             
 
                        output = new OrderVector();
@@ -622,8 +626,7 @@ SAbundVector* InputData::getSAbundVector(){
                        }
                        else if(format == "sabund"){
                                input = new SAbundVector(fileHandle);
-                       }
-                                       
+                       }                                       
                        m->gobble(fileHandle);
 
                        sabund = new SAbundVector();
@@ -650,7 +653,7 @@ SAbundVector* InputData::getSAbundVector(string label){
                
                if(in){
                        if (format == "list") {
-                       
+                m->saveNextLabel = "";
                                while (in.eof() != true) {
                                        
                                        input = new ListVector(in);
@@ -664,7 +667,7 @@ SAbundVector* InputData::getSAbundVector(string label){
                                }
                        }
                        else if (format == "shared")  {
-                               
+                               m->saveNextLabel = "";
                                while (in.eof() != true) {
                                        
                                        input = new SharedListVector(in);
@@ -762,7 +765,7 @@ RAbundVector* InputData::getRAbundVector(){
                        else if(format == "sabund"){
                                input = new SAbundVector(fileHandle);
                        }
-                                       
+                       
                        m->gobble(fileHandle);
 
                        rabund = new RAbundVector();
@@ -789,6 +792,7 @@ RAbundVector* InputData::getRAbundVector(string label){
                
                if(in){
                        if (format == "list") {
+                m->saveNextLabel = "";
                        
                                while (in.eof() != true) {
                                        
@@ -803,6 +807,7 @@ RAbundVector* InputData::getRAbundVector(string label){
                                }
                        }
                        else if (format == "shared")  {
+                m->saveNextLabel = "";
                                
                                while (in.eof() != true) {
                                        
@@ -862,7 +867,8 @@ RAbundVector* InputData::getRAbundVector(string label){
                                        
                                }
 
-                       }
+                       }                       
+                       
                        
                        in.close();