}
/*******************************************************/
-/******************************************************/
-
-ListVector* GlobalData::getListVector() { return gListVector; }
-/*******************************************************/
-
-/******************************************************/
-void GlobalData::setListVector(ListVector* lv){
- try {
- if(gListVector != NULL){ delete gListVector; }
- gListVector = new ListVector(*lv);
- }
- catch(exception& e) {
- cout << "Standard Error: " << e.what() << " has occurred in the GlobalData class Function setListVector. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
- exit(1);
- }
- catch(...) {
- cout << "An unknown error has occurred in the GlobalData class function setListVector. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
- exit(1);
- }
-}
-/*******************************************************/
-
-/******************************************************/
-
-SparseMatrix* GlobalData::getSparseMatrix() { return gSparseMatrix; }
-/*******************************************************/
-
-/******************************************************/
-void GlobalData::setSparseMatrix(SparseMatrix* sm){
- try{
- if(gSparseMatrix != NULL){ delete gSparseMatrix; }
- gSparseMatrix = new SparseMatrix(*sm);
- }
- catch(exception& e) {
- cout << "Standard Error: " << e.what() << " has occurred in the GlobalData class Function setSparseMatrix. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
- exit(1);
- }
- catch(...) {
- cout << "An unknown error has occurred in the GlobalData class function setSparseMatrix. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
- exit(1);
- }
-}
-/*******************************************************/
-
/******************************************************/
//This function parses through the option string of the command to remove its parameters
void GlobalData::parseGlobalData(string commandString, string optionText){
try {
- allLines = 1;
commandName = commandString; //save command name to be used by other classes
//set all non filename paramters to default
reset();
//clears out data from previous read
- if ((commandName == "read.dist") || (commandName == "read.otu") || (commandName == "read.tree") || (commandName == "read.shared")) {
+ if ((commandName == "read.dist") || (commandName == "read.otu") || (commandName == "read.tree")) {
clear();
gGroupmap = NULL;
gTree.clear();
labels.clear(); lines.clear(); groups.clear();
+ allLines = 1;
}
//saves help request
lines.clear();
line = value;
label = "";
- splitAtDash(value, lines);
- allLines = 0;
+ if (line != "all") { splitAtDash(value, lines); allLines = 0; }
+ else { allLines = 1; }
}
if (key == "label") {//stores lines to be used in a vector
labels.clear();
label = value;
line = "";
- splitAtDash(value, labels);
- allLines = 0;
+ if (label != "all") { splitAtDash(value, labels); allLines = 0; }
+ else { allLines = 1; }
}
+
if (key == "groups") {//stores groups to be used in a vector
Groups.clear();
groups = value;
cutoff = "10.00";
precision = "100";
iters = "1000";
- line = "";
- label = "";
groups = "";
jumble = "1"; //0 means don't jumble, 1 means jumble.
randomtree = ""; //"" means user will enter some user trees, "outputfile" means they just want the random tree distribution to be outputted to outputfile.