X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=globaldata.cpp;h=3ddd02e5c24dc03cd8ff7549b6b03a32982562e9;hb=39ef0543b73cb12dfc64529522b66ad3df7527d0;hp=015293d727e5e94c51f1ce2bbe5a7ff6c6a7aee9;hpb=3c5c4e255ee8c36feb9e97aebc4e792e6ff8c440;p=mothur.git diff --git a/globaldata.cpp b/globaldata.cpp index 015293d..3ddd02e 100644 --- a/globaldata.cpp +++ b/globaldata.cpp @@ -16,50 +16,6 @@ GlobalData* GlobalData::getInstance() { } /*******************************************************/ -/******************************************************/ - -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){ @@ -71,7 +27,7 @@ void GlobalData::parseGlobalData(string commandString, string optionText){ 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(); @@ -185,6 +141,7 @@ void GlobalData::parseGlobalData(string commandString, string optionText){ //set format for shared if ((listfile != "") && (groupfile != "")) { format = "shared"; } + if ((phylipfile != "") && (groupfile != "")) { format = "matrix"; } //input defaults for calculators if (commandName == "collect.single") {