InputData::InputData(string fName, string f) : format(f){
m = MothurOut::getInstance();
- globaldata = GlobalData::getInstance();
m->openInputFile(fName, fileHandle);
filename = fName;
-
+ m->saveNextLabel = "";
}
-
/***********************************************************************/
-
InputData::~InputData(){
fileHandle.close();
- globaldata = GlobalData::getInstance();
- globaldata->saveNextLabel = "";
-// delete output;
-
+ m->saveNextLabel = "";
}
/***********************************************************************/
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;
ofHandle.close();
m->openInputFile(fName, fileHandle);
+ m->saveNextLabel = "";
+
}
catch(exception& e) {
m->errorOut(e, "InputData", "InputData");
ifstream in;
string thisLabel;
m->openInputFile(filename, in);
+ m->saveNextLabel = "";
if(in){
string thisLabel;
fileHandle.clear();
fileHandle.seekg(0);
+ m->saveNextLabel = "";
if(fileHandle){
ifstream in;
string thisLabel;
m->openInputFile(filename, in);
+ m->saveNextLabel = "";
if(in){
else if(format == "sabund"){
input = new SAbundVector(fileHandle);
}
-
+
m->gobble(fileHandle);
output = new OrderVector();
if(in){
if((format == "list") || (format == "listorder")) {
-
+ m->saveNextLabel = "";
while (in.eof() != true) {
input = new ListVector(in);
}
}
else if (format == "shared") {
-
+ m->saveNextLabel = "";
while (in.eof() != true) {
input = new SharedListVector(in);
}
}
-
+
in.close();
output = new OrderVector();
}
}else if (format == "shared") {
SharedList = new SharedListVector(fileHandle);
+
if (SharedList != NULL) {
return SharedList->getSharedRAbundVector();
}
string thisLabel;
m->openInputFile(filename, in);
- globaldata->saveNextLabel = "";
+ m->saveNextLabel = "";
if(in){
if (format == "sharedfile") {
while (in.eof() != true) {
SharedList = new SharedListVector(in);
+
if (SharedList != NULL) {
thisLabel = SharedList->getLabel();
//if you are at the last label
string thisLabel;
m->openInputFile(filename, in);
- globaldata->saveNextLabel = "";
+ m->saveNextLabel = "";
if(in){
if (format == "relabund") {
}
else if(format == "sabund"){
input = new SAbundVector(fileHandle);
- }
-
+ }
m->gobble(fileHandle);
sabund = new SAbundVector();
if(in){
if (format == "list") {
-
+ m->saveNextLabel = "";
while (in.eof() != true) {
input = new ListVector(in);
}
}
else if (format == "shared") {
-
+ m->saveNextLabel = "";
while (in.eof() != true) {
input = new SharedListVector(in);
else if(format == "sabund"){
input = new SAbundVector(fileHandle);
}
-
+
m->gobble(fileHandle);
rabund = new RAbundVector();
if(in){
if (format == "list") {
+ m->saveNextLabel = "";
while (in.eof() != true) {
}
}
else if (format == "shared") {
+ m->saveNextLabel = "";
while (in.eof() != true) {
}
- }
+ }
+
in.close();