/******************************************************/
void ErrorCheck::refresh() {
- columnfile = globaldata->getColumnFile();
- phylipfile = globaldata->getPhylipFile();
- listfile = globaldata->getListFile();
- rabundfile = globaldata->getRabundFile();
- sabundfile = globaldata->getSabundFile();
- namefile = globaldata->getNameFile();
- groupfile = globaldata->getGroupFile();
- orderfile = globaldata->getOrderFile();
- fastafile = globaldata->getFastaFile();
- treefile = globaldata->getTreeFile();
- cutoff = globaldata->getCutOff();
- format = globaldata->getFormat();
- method = globaldata->getMethod();
- randomtree = globaldata->getRandomTree();
- sharedfile = globaldata->getSharedFile();
+ //columnfile = globaldata->getColumnFile();
+ //phylipfile = globaldata->getPhylipFile();
+ //listfile = globaldata->getListFile();
+ //rabundfile = globaldata->getRabundFile();
+ //sabundfile = globaldata->getSabundFile();
+ //namefile = globaldata->getNameFile();
+ //groupfile = globaldata->getGroupFile();
+ //orderfile = globaldata->getOrderFile();
+ //fastafile = globaldata->getFastaFile();
+ //treefile = globaldata->getTreeFile();
+ //cutoff = globaldata->getCutOff();
+ //format = globaldata->getFormat();
+ //method = globaldata->getMethod();
+ //randomtree = globaldata->getRandomTree();
+ //sharedfile = globaldata->getSharedFile();
}
/*******************************************************/
//is it a valid parameter
if (validParameter->isValidParameter(parameter, commandName, value) != true) { return false; }
-
-
if (parameter == "phylip" ) { phylipfile = value; }
if (parameter == "column" ) { columnfile = value; }
if(globaldata->gListVector != NULL) {
listOfNames = new ListVector(*globaldata->gListVector);
+ vector<string> names;
+ string binnames;
//map names to rows in sparsematrix
for (int i = 0; i < listOfNames->size(); i++) {
- nameToIndex[listOfNames->get(i)] = i;
+ names.clear();
+ binnames = listOfNames->get(i);
+ splitAtComma(binnames, names);
+
+ for (int j = 0; j < names.size(); j++) {
+ nameToIndex[names[j]] = i;
+ }
}
- }else { cout << "error" << endl; }
+ }else { cout << "error, no listvector." << endl; }
fastafile = globaldata->getFastaFile();
string minName;
binnames = list->get(bin);
-
+
//parse names into vector
splitAtComma(binnames, names);
//fill binMap
for (int i = 0; i < names.size(); i++) {
for (it3 = nameToIndex.begin(); it3 != nameToIndex.end(); it3++) {
+
if (it3->first == names[i]) {
binMap[it3->second] = it3->first;