pickedGroups = true;
m->splitAtDash(groups, Groups);
}
- m->Groups = Groups;
+ m->setGroups(Groups);
outputDir = validParameter.validFile(parameters, "outputdir", false); if (outputDir == "not found"){ outputDir = m->hasPath(inputFileName); }
}
string temp;
temp = validParameter.validFile(parameters, "numaxes", false); if (temp == "not found"){ temp = "3"; }
- convert(temp, numaxes);
+ m->mothurConvert(temp, numaxes);
method = validParameter.validFile(parameters, "method", false); if (method == "not found"){ method = "pearson"; }
//for each bin
vector<string> newBinLabels;
+ string snumBins = toString(thislookup[0]->getNumBins());
for (int i = 0; i < thislookup[0]->getNumBins(); i++) {
if (m->control_pressed) { for (int j = 0; j < newLookup.size(); j++) { delete newLookup[j]; } return 0; }
}
//if there is a bin label use it otherwise make one
- string binLabel = "Otu" + toString(i+1);
+ string binLabel = "Otu";
+ string sbinNumber = toString(i+1);
+ if (sbinNumber.length() < snumBins.length()) {
+ int diff = snumBins.length() - sbinNumber.length();
+ for (int h = 0; h < diff; h++) { binLabel += "0"; }
+ }
+ binLabel += sbinNumber;
if (i < m->currentBinLabels.size()) { binLabel = m->currentBinLabels[i]; }
newBinLabels.push_back(binLabel);
//remove any groups the user does not want, and set globaldata->groups with only valid groups
SharedUtil* util;
util = new SharedUtil();
-
- util->setGroups(m->Groups, groupNames);
+ Groups = m->getGroups();
+ util->setGroups(Groups, groupNames);
+ m->setGroups(Groups);
for (int i = 0; i < lookupFloat.size(); i++) {
//if this sharedrabund is not from a group the user wants then delete it.
- if (util->isValidGroup(lookupFloat[i]->getGroup(), m->Groups) == false) {
+ if (util->isValidGroup(lookupFloat[i]->getGroup(), m->getGroups()) == false) {
delete lookupFloat[i]; lookupFloat[i] = NULL;
lookupFloat.erase(lookupFloat.begin()+i);
i--;