X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=inputdata.cpp;h=8b1829a3db697df21b3d0f64bf6be6cfea15c536;hp=ec23955513f42c218ed750be5471eb23ee08cd40;hb=615301e57c25e241356a9c2380648d117709458d;hpb=ca9ac1d80c62f57270b0dcd49410ebe08a8aecd6 diff --git a/inputdata.cpp b/inputdata.cpp index ec23955..8b1829a 100644 --- a/inputdata.cpp +++ b/inputdata.cpp @@ -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"); @@ -292,7 +293,7 @@ OrderVector* InputData::getOrderVector(){ else if(format == "sabund"){ input = new SAbundVector(fileHandle); } - + m->gobble(fileHandle); output = new OrderVector(); @@ -394,7 +395,7 @@ OrderVector* InputData::getOrderVector(string label){ } } - + in.close(); output = new OrderVector(); @@ -622,8 +623,7 @@ SAbundVector* InputData::getSAbundVector(){ } else if(format == "sabund"){ input = new SAbundVector(fileHandle); - } - + } m->gobble(fileHandle); sabund = new SAbundVector(); @@ -762,7 +762,7 @@ RAbundVector* InputData::getRAbundVector(){ else if(format == "sabund"){ input = new SAbundVector(fileHandle); } - + m->gobble(fileHandle); rabund = new RAbundVector(); @@ -862,7 +862,8 @@ RAbundVector* InputData::getRAbundVector(string label){ } - } + } + in.close();