sabund = inputSabund->getSAbundVector();
//if (globaldata->sabund != NULL) { delete globaldata->sabund; }
globaldata->sabund = sabund; //saving to be used by summary command.
+ delete inputSabund;
rabund = inputRabund->getRAbundVector();
//if (globaldata->rabund != NULL) { delete globaldata->rabund; }
globaldata->rabund = rabund; //saving to be used by heatmap.bin command.
+ delete inputRabund;
list = inputList->getListVector();
//if (globaldata->gListVector != NULL) { delete globaldata->gListVector; }
globaldata->gListVector = list;
+ delete inputList;
}else if (globaldata->getFormat() == "shared") {
SharedList = input->getSharedListVector(); //you are reading for collect.shared, rarefaction.shared, summary.shared, parselist command, or shared commands.
if (abort == false) {
//gets whichever one of the above is set
filename = globaldata->inputFileName;
- //read = new ReadOTUFile(filename);
}
}
//**********************************************************************************************************************
ReadOtuCommand::~ReadOtuCommand(){
- if (abort == false) { //delete read;
- }
-}
+ }
//**********************************************************************************************************************
if (abort == true) { return 0; }
- //read->read(&*globaldata);
if (globaldata->getFormat() == "shared") {
- //groupMap->readMap();
parselist = new ParseListCommand();
parselist->execute();
fastafile = validParameter.validFile(parameters, "fasta", true);
if (fastafile == "not found") { cout << "fasta is a required parameter for the screen.seqs command." << endl; abort = true; }
else if (fastafile == "not open") { abort = true; }
-
+
groupfile = validParameter.validFile(parameters, "group", true);
if (groupfile == "not open") { abort = true; }
else if (groupfile == "not found") { groupfile = ""; }
alignreport = validParameter.validFile(parameters, "alignreport", true);
if (alignreport == "not open") { abort = true; }
- else if (alignreport == "not found") { namefile = ""; }
+ else if (alignreport == "not found") { alignreport = ""; }
//check for optional parameter and set defaults
// ...at some point should added some additional type checking...
}
//updates sharedVector
- sharedRAbund.push_back(sharedGroups);
+ //sharedRAbund.push_back(sharedGroups);
}
GlobalData* globaldata;
map<string, SharedRAbundVector*>::iterator it;
void parse(int, SharedListVector*);
- vector< map<string, SharedRAbundVector*> > sharedRAbund; //contains all the info needed to create the .shared file not sure if we will need
+ //vector< map<string, SharedRAbundVector*> > sharedRAbund; //contains all the info needed to create the .shared file not sure if we will need
};
#endif
if (count != 1) { delete lastList; }
lastList = SharedList;
SharedList = input->getSharedListVector(); //get new list vector to process
+ count++;
//if (count != 1) { for (int i = 0; i < lastLookup.size(); i++) { delete lastLookup[i]; } }
//lastLookup = lookup;
printSharedData(); //prints info to the .shared file
}
- delete lastList;
+ delete lastList; globaldata->gSharedList = NULL;
delete shared;
out.close();
if (globaldata->gGroupmap == NULL) { groupmap = new GroupMap(); }
- int num, inputData, pos, count;
+ int num, inputData, count;
count = 0;
string holdLabel, nextLabel, groupN;
individual newguy;
}
- //save position in file in case next line is a new label.
- pos = f.tellg();
-
if (f.eof() != true) { f >> nextLabel; }
//read the rest of the groups info in
lookup[count]->push_back(inputData, i, groupN); //abundance, bin, group
}
- //save position in file in case next line is a new label.
- pos = f.tellg();
-
+
if (f.eof() != true) { f >> nextLabel; }
}
//put file pointer back since you are now at a new distance label
- f.seekg(pos, ios::beg);
+ for (int i = 0; i < nextLabel.length(); i++) { f.unget(); }
if (globaldata->gGroupmap == NULL) { globaldata->gGroupmap = groupmap; }
i--;
}
}
-
+
+ delete util;
+
return lookup;
}
catch(exception& e) {