InputData::InputData(string fName, string f) : format(f){
m = MothurOut::getInstance();
+ globaldata = GlobalData::getInstance();
m->openInputFile(fName, fileHandle);
filename = fName;
InputData::InputData(string fName, string orderFileName, string f) : format(f){
try {
m = MothurOut::getInstance();
+ globaldata = GlobalData::getInstance();
ifstream ofHandle;
m->openInputFile(orderFileName, ofHandle);
string name;
string thisLabel;
m->openInputFile(filename, in);
-
+ globaldata->saveNextLabel = "";
+
if(in){
if (format == "sharedfile") {
while (in.eof() != true) {
SharedRAbundVector* SharedRAbund = new SharedRAbundVector(in);
if (SharedRAbund != NULL) {
thisLabel = SharedRAbund->getLabel();
+
//if you are at the last label
if (thisLabel == label) { in.close(); return SharedRAbund->getSharedRAbundVectors(); }
else {
string thisLabel;
m->openInputFile(filename, in);
+ globaldata->saveNextLabel = "";
if(in){
- if (format == "sharedfile") {
+ if (format == "relabund") {
while (in.eof() != true) {
SharedRAbundFloatVector* SharedRelAbund = new SharedRAbundFloatVector(in);