if (parameter == "label" ) { label = value; }
if (parameter == "abund" ) { abund = value; }
if (parameter == "random" ) { randomtree = value; }
+ if (parameter == "sorted" ) { sorted = value; }
}
//gets the last parameter and value
if (parameter == "label" ) { label = value; }
if (parameter == "random" ) { randomtree = value; }
if (parameter == "abund" ) { abund = value; }
+ if (parameter == "sorted" ) { sorted = value; }
}
}
void clear();
void refresh();
string phylipfile, columnfile, listfile, rabundfile, sabundfile, namefile, groupfile, orderfile, fastafile, treefile, sharedfile, cutoff, format;
- string precision, method, fileroot, label, line, iters, jumble, freq, single, rarefaction, shared, summary, randomtree, abund;
+ string precision, method, fileroot, label, line, iters, jumble, freq, single, rarefaction, shared, summary, randomtree, abund, sorted;
string commandName, optionText;
bool errorFree;
if (key == "calc") { calc = value; }
if (key == "step") { step = value; }
if (key == "form") { form = value; }
+ if (key == "sorted") { sorted = value; }
if (key == "fileroot" ) { fileroot = value; }
if (key == "abund" ) { abund = value; }
if (key == "random" ) { randomtree = value; }
- if (key == "calc") { calc = value; }
+ if (key == "calc") { calc = value; }
if (key == "step") { step = value; }
if (key == "form") { form = value; }
+ if (key == "sorted") { sorted = value; }
if (key == "line") {//stores lines to be used in a vector
lines.clear();
string GlobalData::getGroups() { return groups; }
string GlobalData::getStep() { return step; }
string GlobalData::getForm() { return form; }
+string GlobalData::getSorted() { return sorted; }
void GlobalData::setListFile(string file) { listfile = file; inputFileName = file;}
void GlobalData::setRabundFile(string file) { rabundfile = file; inputFileName = file;}
void GlobalData::setSabundFile(string file) { sabundfile = file; inputFileName = file;}
abund = "10";
step = "0.01";
form = "integral";
+ sorted = "1"; //0 means don't sort, 1 means sort.
}
//*******************************************************/
iters = "1000";
groups = "";
jumble = "1"; //0 means don't jumble, 1 means jumble.
+ sorted = "1"; //0 means don't sort, 1 means sort.
randomtree = ""; //"" means user will enter some user trees, "outputfile" means they just want the random tree distribution to be outputted to outputfile.
freq = "100";
method = "furthest";
string getGroups();
string getStep();
string getForm();
+ string getSorted();
void setListFile(string);
void setPhylipFile(string);
private:
string phylipfile, columnfile, listfile, rabundfile, sabundfile, namefile, groupfile, orderfile, fastafile, treefile, sharedfile, line, label, randomtree, groups;
- string cutoff, format, precision, method, fileroot, iters, jumble, freq, calc, abund, step, form;
+ string cutoff, format, precision, method, fileroot, iters, jumble, freq, calc, abund, step, form, sorted;
static GlobalData* _uniqueInstance;
GlobalData( const GlobalData& ); // Disable copy constructor
try {
globaldata = GlobalData::getInstance();
format = globaldata->getFormat();
+ sorted = globaldata->getSorted();
}
catch(exception& e) {
getSharedVectors(sharedorder);
//sort lookup so shared bins are on top
- sortSharedVectors();
+ if (sorted == "1") { sortSharedVectors(); }
//get maxBin
for (int i = 0; i < lookup.size(); i++) {
GlobalData* globaldata;
vector<SharedRAbundVector*> lookup;
RAbundVector rabund;
- string format;
+ string format, sorted, groupComb;
ofstream outsvg;
map<int, string> colorScale;
map<int, string>::iterator it;
- string groupComb;
};
string unifracUnweightedArray[] = {"group","iters"};
commandParameters["unifrac.unweighted"] = addParameters(unifracUnweightedArray, sizeof(unifracUnweightedArray)/sizeof(string));
- string heatmapArray[] = {"group","line","label"};
+ string heatmapArray[] = {"group","line","label","sorted"};
commandParameters["heatmap"] = addParameters(heatmapArray, sizeof(heatmapArray)/sizeof(string));
string quitArray[] = {};