if(globaldata->allLines == 1 || globaldata->lines.count(count) == 1 || globaldata->labels.count(list->getLabel()) == 1){
- //create output file
+ //make new folder for bin info
+ //string foldername = "/" + getRootName(globaldata->getListFile()) + list->getLabel() + ".bins/";
+ // mkdir(foldername.c_str());
+
string outputFileName = getRootName(globaldata->getListFile()) + list->getLabel() + ".fasta";
openOutputFile(outputFileName, out);
//for each bin in the list vector
for (int i = 0; i < list->size(); i++) {
+
+ //create output file
+ //string outputFileName = foldername + getRootName(globaldata->getListFile()) + "bin" + toString(i+1) + ".fasta";
+ //openOutputFile(outputFileName, out);
+
binnames = list->get(i);
while (binnames.find_first_of(',') != -1) {
name = binnames.substr(0,binnames.find_first_of(','));
//do work for that name
sequence = fasta->getSequence(name);
if (sequence != "not found") {
- name = name + "bin" + toString(i+1);
+ name = name + "|" + toString(i+1);
out << ">" << name << endl;
out << sequence << endl;
}else {
remove(outputFileName.c_str());
return 0;
}
+ //out.close();
}
+ out.close();
}
list = input->getListVector();
cDisplays.push_back(new CollectDisplay(new SharedSobsCS(), new SharedOneColumnFile(fileNameRoot+"shared.sobs")));
}else if (globaldata->Estimators[i] == "sharedace") {
cDisplays.push_back(new CollectDisplay(new SharedAce(), new SharedOneColumnFile(fileNameRoot+"shared.ace")));
- }else if (globaldata->Estimators[i] == "sharedjabund") {
- cDisplays.push_back(new CollectDisplay(new SharedJAbund(), new SharedOneColumnFile(fileNameRoot+"shared.jabund")));
- }else if (globaldata->Estimators[i] == "sharedsorensonabund") {
- cDisplays.push_back(new CollectDisplay(new SharedSorAbund(), new SharedOneColumnFile(fileNameRoot+"shared.sorabund")));
- }else if (globaldata->Estimators[i] == "sharedjclass") {
- cDisplays.push_back(new CollectDisplay(new SharedJclass(), new SharedOneColumnFile(fileNameRoot+"shared.jclass")));
- }else if (globaldata->Estimators[i] == "sharedsorclass") {
- cDisplays.push_back(new CollectDisplay(new SharedSorClass(), new SharedOneColumnFile(fileNameRoot+"shared.sorclass")));
- }else if (globaldata->Estimators[i] == "sharedjest") {
- cDisplays.push_back(new CollectDisplay(new SharedJest(), new SharedOneColumnFile(fileNameRoot+"shared.jest")));
- }else if (globaldata->Estimators[i] == "sharedsorest") {
- cDisplays.push_back(new CollectDisplay(new SharedSorEst(), new SharedOneColumnFile(fileNameRoot+"shared.sorest")));
- }else if (globaldata->Estimators[i] == "sharedthetayc") {
- cDisplays.push_back(new CollectDisplay(new SharedThetaYC(), new SharedOneColumnFile(fileNameRoot+"shared.thetayc")));
- }else if (globaldata->Estimators[i] == "sharedthetan") {
- cDisplays.push_back(new CollectDisplay(new SharedThetaN(), new SharedOneColumnFile(fileNameRoot+"shared.thetan")));
- }else if (globaldata->Estimators[i] == "sharedkstest") {
- cDisplays.push_back(new CollectDisplay(new SharedKSTest(), new SharedOneColumnFile(fileNameRoot+"shared.kstest")));
- }else if (globaldata->Estimators[i] == "sharedbdiversity") {
- cDisplays.push_back(new CollectDisplay(new SharedBDiversity(), new SharedOneColumnFile(fileNameRoot+"shared.bdiversity")));
+ }else if (globaldata->Estimators[i] == "jabund") {
+ cDisplays.push_back(new CollectDisplay(new JAbund(), new SharedOneColumnFile(fileNameRoot+"jabund")));
+ }else if (globaldata->Estimators[i] == "sorensonabund") {
+ cDisplays.push_back(new CollectDisplay(new SorAbund(), new SharedOneColumnFile(fileNameRoot+"sorabund")));
+ }else if (globaldata->Estimators[i] == "jclass") {
+ cDisplays.push_back(new CollectDisplay(new Jclass(), new SharedOneColumnFile(fileNameRoot+"jclass")));
+ }else if (globaldata->Estimators[i] == "sorclass") {
+ cDisplays.push_back(new CollectDisplay(new SorClass(), new SharedOneColumnFile(fileNameRoot+"sorclass")));
+ }else if (globaldata->Estimators[i] == "jest") {
+ cDisplays.push_back(new CollectDisplay(new Jest(), new SharedOneColumnFile(fileNameRoot+"jest")));
+ }else if (globaldata->Estimators[i] == "sorest") {
+ cDisplays.push_back(new CollectDisplay(new SorEst(), new SharedOneColumnFile(fileNameRoot+"sorest")));
+ }else if (globaldata->Estimators[i] == "thetayc") {
+ cDisplays.push_back(new CollectDisplay(new ThetaYC(), new SharedOneColumnFile(fileNameRoot+"thetayc")));
+ }else if (globaldata->Estimators[i] == "thetan") {
+ cDisplays.push_back(new CollectDisplay(new ThetaN(), new SharedOneColumnFile(fileNameRoot+"thetan")));
+ }else if (globaldata->Estimators[i] == "kstest") {
+ cDisplays.push_back(new CollectDisplay(new KSTest(), new SharedOneColumnFile(fileNameRoot+"kstest")));
+ }else if (globaldata->Estimators[i] == "bdiversity") {
+ cDisplays.push_back(new CollectDisplay(new BDiversity(), new SharedOneColumnFile(fileNameRoot+"bdiversity")));
}else if (globaldata->Estimators[i] == "sharednseqs") {
cDisplays.push_back(new CollectDisplay(new SharedNSeqs(), new SharedOneColumnFile(fileNameRoot+"shared.nseqs")));
- }else if (globaldata->Estimators[i] == "sharedochiai") {
- cDisplays.push_back(new CollectDisplay(new SharedOchiai(), new SharedOneColumnFile(fileNameRoot+"shared.ochiai")));
- }else if (globaldata->Estimators[i] == "sharedanderberg") {
- cDisplays.push_back(new CollectDisplay(new SharedAnderberg(), new SharedOneColumnFile(fileNameRoot+"shared.anderberg")));
- }else if (globaldata->Estimators[i] == "sharedkulczynski") {
- cDisplays.push_back(new CollectDisplay(new SharedKulczynski(), new SharedOneColumnFile(fileNameRoot+"shared.kulczynski")));
- }else if (globaldata->Estimators[i] == "sharedkulczynskicody") {
- cDisplays.push_back(new CollectDisplay(new SharedKulczynskiCody(), new SharedOneColumnFile(fileNameRoot+"shared.kulczynskicody")));
- }else if (globaldata->Estimators[i] == "sharedlennon") {
- cDisplays.push_back(new CollectDisplay(new SharedLennon(), new SharedOneColumnFile(fileNameRoot+"shared.lennon")));
- }else if (globaldata->Estimators[i] == "sharedmorisitahorn") {
- cDisplays.push_back(new CollectDisplay(new SharedMorHorn(), new SharedOneColumnFile(fileNameRoot+"shared.morisitahorn")));
- }else if (globaldata->Estimators[i] == "sharedbraycurtis") {
- cDisplays.push_back(new CollectDisplay(new SharedBrayCurtis(), new SharedOneColumnFile(fileNameRoot+"shared.braycurtis")));
+ }else if (globaldata->Estimators[i] == "ochiai") {
+ cDisplays.push_back(new CollectDisplay(new Ochiai(), new SharedOneColumnFile(fileNameRoot+"ochiai")));
+ }else if (globaldata->Estimators[i] == "anderberg") {
+ cDisplays.push_back(new CollectDisplay(new Anderberg(), new SharedOneColumnFile(fileNameRoot+"anderberg")));
+ }else if (globaldata->Estimators[i] == "skulczynski") {
+ cDisplays.push_back(new CollectDisplay(new Kulczynski(), new SharedOneColumnFile(fileNameRoot+"kulczynski")));
+ }else if (globaldata->Estimators[i] == "kulczynskicody") {
+ cDisplays.push_back(new CollectDisplay(new KulczynskiCody(), new SharedOneColumnFile(fileNameRoot+"kulczynskicody")));
+ }else if (globaldata->Estimators[i] == "lennon") {
+ cDisplays.push_back(new CollectDisplay(new Lennon(), new SharedOneColumnFile(fileNameRoot+"lennon")));
+ }else if (globaldata->Estimators[i] == "morisitahorn") {
+ cDisplays.push_back(new CollectDisplay(new MorHorn(), new SharedOneColumnFile(fileNameRoot+"morisitahorn")));
+ }else if (globaldata->Estimators[i] == "braycurtis") {
+ cDisplays.push_back(new CollectDisplay(new BrayCurtis(), new SharedOneColumnFile(fileNameRoot+"braycurtis")));
}
}
}
if(globaldata->allLines == 1 || globaldata->lines.count(count) == 1 || globaldata->labels.count(list->getLabel()) == 1){
//create output file
- string outputFileName = getRootName(globaldata->getListFile()) + list->getLabel() + ".fastarep";
+ string outputFileName = getRootName(globaldata->getListFile()) + list->getLabel() + ".rep.fasta";
openOutputFile(outputFileName, out);
cout << list->getLabel() << '\t' << count << endl;
sequence = fasta->getSequence(nameRep);
if (sequence != "not found") {
- nameRep = nameRep + "bin" + toString(i+1);
+ nameRep = nameRep + "|" + toString(i+1);
out << ">" << nameRep << endl;
out << sequence << endl;
}else {
return 0;
}
}
+
+ out.close();
}
list = input->getListVector();
//input defaults for calculators
if (commandName == "collect.single") {
- if ((calc == "default") || (calc == "")) { calc = "sobs-chao-ace-jack-bootstrap-shannon-npshannon-simpson-geom-qstat-logsd-bergerparker-bstick"; }
+ if ((calc == "default") || (calc == "")) { calc = "sobs-chao-ace-jack-shannon-npshannon-simpson"; }
Estimators.clear();
splitAtDash(calc, Estimators);
}
splitAtDash(calc, Estimators);
}
if (commandName == "collect.shared") {
- if ((calc == "default") || (calc == "")) { calc = "sharedsobs-sharedchao-sharedace-sharedjabund-sharedsorensonabund-sharedjclass-sharedsorclass-sharedjest-sharedsorest-sharedthetayc-sharedthetan-sharedkstest-sharedbdiversity"; }
+ if ((calc == "default") || (calc == "")) { calc = "sharedsobs-sharedchao-sharedace-jabund-sorensonabund-jclass-sorclass-jest-sorest-thetayc-thetan"; }
Estimators.clear();
splitAtDash(calc, Estimators);
}
if (commandName == "summary.single") {
- if ((calc == "default") || (calc == "")) { calc = "sobs-chao-ace-jack-bootstrap-shannon-npshannon-simpson-geom-logsd-qstat-bergerparker-bstick"; }
+ if ((calc == "default") || (calc == "")) { calc = "sobs-chao-ace-jack-shannon-npshannon-simpson"; }
Estimators.clear();
splitAtDash(calc, Estimators);
}
if (commandName == "summary.shared") {
- if ((calc == "default") || (calc == "")) { calc = "sharedsobs-sharedchao-sharedace-sharedjabund-sharedsorensonabund-sharedjclass-sharedsorclass-sharedjest-sharedsorest-sharedthetayc-sharedthetan-sharedkstest-sharedbdiversity"; }
+ if ((calc == "default") || (calc == "")) { calc = "sharedsobs-sharedchao-sharedace-jabund-sorensonabund-jclass-sorclass-jest-sorest-thetayc-thetan"; }
Estimators.clear();
splitAtDash(calc, Estimators);
}
rabund = order->getRAbundVector();
+ //get users scaling method
+ scaler = globaldata->getScaler();
+
+ float maxbin = 0.0;
for (int i = 0; i < rabund.size(); i++) {
- colorScale[rabund.get(i)] = "";
+ if (rabund.get(i) != 0) { //don't want log value of 0.
+ if (scaler == "log10") {
+ colorScale[(log10((rabund.get(i) / (float)rabund.getNumSeqs()) * 100))] = "";
+ if (maxbin < (log10((rabund.get(i) / (float)rabund.getNumSeqs()) * 100))) { maxbin = (log10((rabund.get(i) / (float)rabund.getNumSeqs()) * 100)); }
+ }else if (scaler == "log2") {
+ colorScale[(log2((rabund.get(i) / (float)rabund.getNumSeqs()) * 100))] = "";
+ if (maxbin < (log2((rabund.get(i) / (float)rabund.getNumSeqs()) * 100))) { maxbin = (log2((rabund.get(i) / (float)rabund.getNumSeqs()) * 100)); }
+ }else if (scaler == "linear") {
+ colorScale[rabund.get(i)] = "";
+ if (maxbin < rabund.get(i)) { maxbin = rabund.get(i); }
+ }else { //if user enters invalid scaler option.
+ cout << scaler << " is not a valid scaler option. I will use log10." << endl;
+ colorScale[(log10((rabund.get(i) / (float)rabund.getNumSeqs()) * 100))] = "";
+ if (maxbin < (log10((rabund.get(i) / (float)rabund.getNumSeqs()) * 100))) { maxbin = (log10((rabund.get(i)) / (float)rabund.getNumSeqs()) * 100); }
+ }
+ }else { colorScale[0] = "00"; }
}
- float scaler = 255 / (float) colorScale.size();
+ float scalers = 255 / (float) maxbin;
//go through map and give each score a color value
for (it = colorScale.begin(); it != colorScale.end(); it++) {
- it->second = toHex(int(float(it->first) * scaler));
+ it->second = toHex(int(float(it->first) * scalers));
if(it->second.length() == 1) { it->second = "0" + it->second; }
}
string filenamesvg = getRootName(globaldata->inputFileName) + order->getLabel() + ".heatmap.svg";
-
openOutputFile(filenamesvg, outsvg);
- //scale max rank so the maxrank = bright red
-
//svg image
- outsvg << "<svg width=\"100%\" height=\"100%\" viewBox=\"0 0 300 " + toString((rabund.getNumBins()*5 + 15)) + "\">\n";
+ outsvg << "<svg width=\"100%\" height=\"100%\" viewBox=\"0 0 300 " + toString((rabund.getNumBins()*5 + 120)) + "\">\n";
outsvg << "<g>\n";
- int x = 15;
- int y = 15;
+ //white backround
+ outsvg << "<rect fill=\"white\" stroke=\"white\" x=\"0\" y=\"0\" width=\"300\" height=\"" + toString((rabund.getNumBins()*5 + 120)) + "\"/>";
+ outsvg << "<text fill=\"black\" class=\"seri\" x=\"100\" y=\"25\">Heatmap at distance " + order->getLabel() + "</text>\n";
+
+ //output legend and color labels
+ //go through map and give each score a color value
string color;
+ int x = 0;
+ int y = 103 + (rabund.getNumBins()*5);
+ if (maxbin != 0) {
+ //convert maxbin to relative abundance again
+ if (scaler == "log10") {
+ maxbin = pow(10, maxbin) / 100;
+ }else if (scaler == "log2") {
+ maxbin = pow(2, maxbin) / 100;
+ }else { maxbin = pow(10, maxbin) / 100; }
+ }else { maxbin = 0.00; }
+
+ //5 is the number of boxes in the legend
+ float maxbinScaler = maxbin / 10;
+ float colorScaler = 255 / 10;
+
+ for (int i = 0; i < 10; i++) {
+ string label = toString(((i+1) * maxbinScaler));
+ //set precision of relative abundance to 3
+ int pos = label.find_first_of('.');
+ label = label.substr(0,pos+4);
+ color = toHex(int((float)(i+1) * colorScaler));
+ outsvg << "<rect fill=\"#" + color + "0000\" stroke=\"#" + color + "0000\" x=\"" + toString(x) + "\" y=\"" + toString(y) + "\" width=\"30\" height=\"10\"/>\n";
+ outsvg << "<text fill=\"black\" class=\"seri\" x=\"" + toString(x) + "\" y=\"" + toString(y) + "\">" + label + "</text>\n";
+ x += 30;
+ }
+
+ x = 0;
+ y = 70;
for (int i = 0; i <= rabund.getNumBins(); i++) {
-
- color = colorScale[rabund.get(i)];
+ if (rabund.get(i) != 0) { //don't want log value of 0.
+ if (scaler == "log10") {
+ color = colorScale[(log10((rabund.get(i) / (float)rabund.getNumSeqs()) * 100))];
+ }else if (scaler == "log2") {
+ color = colorScale[(log2((rabund.get(i) / (float)rabund.getNumSeqs()) * 100))];
+ }else if (scaler == "linear") {
+ color = colorScale[rabund.get(i)];
+ }else { color = colorScale[(log10((rabund.get(i) / (float)rabund.getNumSeqs()) * 100))]; }
+ }else { color = "OO"; }
outsvg << "<rect fill=\"#" + color + "0000\" stroke=\"#" + color + "0000\" x=\"" + toString(x) + "\" y=\"" + toString(y) + "\" width=\"300\" height=\"5\"/>\n";
y += 5;
}
- outsvg << "</g>\n</svg>\n";
+ outsvg << "</g>\n</svg>\n";
outsvg.close();
}
if (scaler == "log10") {
colorScale[(log10((lookup[i]->getAbundance(j) / (float)lookup[i]->getNumSeqs()) * 100))] = "";
if (maxbin < (log10((lookup[i]->getAbundance(j) / (float)lookup[i]->getNumSeqs()) * 100))) { maxbin = (log10((lookup[i]->getAbundance(j) / (float)lookup[i]->getNumSeqs()) * 100)); }
- //cout << "abundance = " << lookup[i]->getAbundance(j) << '\t' << " relative adundance = " << (lookup[i]->getAbundance(j) / (float)lookup[i]->getNumSeqs()) << '\t';
- //cout << (log10((lookup[i]->getAbundance(j) / (float)lookup[i]->getNumSeqs()) * 100)) << endl;
}else if (scaler == "log2") {
colorScale[(log2((lookup[i]->getAbundance(j) / (float)lookup[i]->getNumSeqs()) * 100))] = "";
if (maxbin < (log2((lookup[i]->getAbundance(j) / (float)lookup[i]->getNumSeqs()) * 100))) { maxbin = (log2((lookup[i]->getAbundance(j) / (float)lookup[i]->getNumSeqs()) * 100)); }
- //cout << "abundance = " << lookup[i]->getAbundance(j) << '\t' << " relative adundance = " << lookup[i]->getAbundance(j) / (float)lookup[i]->getNumSeqs() << '\t';
- //cout << (log2((lookup[i]->getAbundance(j) / (float)lookup[i]->getNumSeqs()) * 100)) << endl;
}else if (scaler == "linear") {
colorScale[lookup[i]->getAbundance(j)] = "";
if (maxbin < lookup[i]->getAbundance(j)) { maxbin = lookup[i]->getAbundance(j); }
- //cout << "abundance = " << lookup[i]->getAbundance(j) << '\t' << " relative adundance = " << lookup[i]->getAbundance(j) << '\t';
- //cout << lookup[i]->getAbundance(j) << endl;
}else { //if user enters invalid scaler option.
cout << scaler << " is not a valid scaler option. I will use log10." << endl;
colorScale[(log10((lookup[i]->getAbundance(j) / (float)lookup[i]->getNumSeqs()) * 100))] = "";
if (maxbin < (log10((lookup[i]->getAbundance(j) / (float)lookup[i]->getNumSeqs()) * 100))) { maxbin = (log10((lookup[i]->getAbundance(j)) / (float)lookup[i]->getNumSeqs()) * 100); }
}
}else { colorScale[0] = "00"; }
-
}
}
-//cout << "maxbin = " << maxbin << endl;
+
//get scaler
float scalers = 255 / (float) maxbin;
for (it = colorScale.begin(); it != colorScale.end(); it++) {
it->second = toHex(int(float(it->first) * scalers));
if(it->second.length() == 1) { it->second = "0" + it->second; }
-//cout << it->first << " " << it->second << endl;
}
string filenamesvg = getRootName(globaldata->inputFileName) + sharedorder->getLabel() + ".heatmap.svg";
outsvg << "<text fill=\"black\" class=\"seri\" x=\"" + toString(((300 * (h+1)) - 150) - ((int)lookup[h]->getGroup().length() / 2)) + "\" y=\"50\">" + lookup[h]->getGroup() + "</text>\n";
}
-
//output legend and color labels
//go through map and give each score a color value
string color;
int x = 0;
- int y = 90 + (lookup[0]->getNumBins()*5);
- for (it = colorScale.begin(); it != colorScale.end(); it++) {
- color = it->second;
- float value = it->first;
-
- //convert it->first to relative abundance again
+ int y = 103 + (lookup[0]->getNumBins()*5);
+ if (maxbin != 0) {
+ //convert maxbin to relative abundance again
if (scaler == "log10") {
- value = pow(10, value) / 100;
+ maxbin = pow(10, maxbin) / 100;
}else if (scaler == "log2") {
- value = pow(2, value) / 100;
- }else { value = pow(10, value) / 100; }
-
- string itprec = toString(value);
-
- //set precision of relative abundance to 2
- int pos = itprec.find_first_of('.');
- itprec = itprec.substr(0,pos+3);
+ maxbin = pow(2, maxbin) / 100;
+ }else { maxbin = pow(10, maxbin) / 100; }
+ }else { maxbin = 0.00; }
+
+ //((lookup.size() * 300) / 60) is the number of boxes in the legend
+ float maxbinScaler = maxbin / ((lookup.size() * 300) / 60);
+ float colorScaler = 255 / ((lookup.size() * 300) / 60);
+
+ for (int i = 0; i < ((lookup.size() * 300) / 60); i++) {
+ string label = toString(((i+1) * maxbinScaler));
+ //set precision of relative abundance to 3
+ int pos = label.find_first_of('.');
+ label = label.substr(0,pos+4);
- outsvg << "<rect fill=\"#" + color + "0000\" stroke=\"#" + color + "0000\" x=\"" + toString(x) + "\" y=\"" + toString(y) + "\" width=\"25\" height=\"10\"/>\n";
- outsvg << "<text fill=\"black\" class=\"seri\" x=\"" + toString(x) + "\" y=\"" + toString(y) + "\">" + itprec + "</text>\n";
- x += 25;
+ color = toHex(int(((i+1) * colorScaler) + 15));
+ outsvg << "<rect fill=\"#" + color + "0000\" stroke=\"#" + color + "0000\" x=\"" + toString(x) + "\" y=\"" + toString(y) + "\" width=\"30\" height=\"10\"/>\n";
+ outsvg << "<text fill=\"black\" class=\"seri\" x=\"" + toString(x) + "\" y=\"" + toString(y) + "\">" + label + "</text>\n";
+ x += 30;
}
x = 0;
y = 70;
- //start at 1 since bin 0 is nothing
- for (int i = 1; i <= lookup[0]->getNumBins(); i++) {
+ for (int i = 0; i <= lookup[0]->getNumBins(); i++) {
for (int j = 0; j < lookup.size(); j++) {
if (lookup[j]->getAbundance(i) != 0) { //don't want log value of 0.
cout << "both the line and label parameters at the same time. The collect.single command should be in the following format: " << "\n";
cout << "collect.single(label=yourLabel, line=yourLines, iters=yourIters, freq=yourFreq, calc=yourEstimators)." << "\n";
cout << "Example collect(label=unique-.01-.03, line=0-5-10, iters=10000, freq=10, calc=sobs-chao-ace-jack)." << "\n";
- cout << "The default values for freq is 100, and calc are sobs-chao-ace-jack-bootstrap-shannon-npshannon-simpson." << "\n";
+ cout << "The default values for freq is 100, and calc are sobs-chao-ace-jack-shannon-npshannon-simpson." << "\n";
cout << "The label and line parameters are used to analyze specific lines in your input." << "\n";
cout << "Note: No spaces between parameter labels (i.e. freq), '=' and parameters (i.e.yourFreq)." << "\n" << "\n";
}else if (globaldata->helpRequest == "collect.shared") {
cout << "The collect.shared command parameters are label, line, freq, jumble, calc and groups. No parameters are required, but you may not use " << "\n";
cout << "both the line and label parameters at the same time. The collect.shared command should be in the following format: " << "\n";
cout << "collect.shared(label=yourLabel, line=yourLines, freq=yourFreq, jumble=yourJumble, calc=yourEstimators, groups=yourGroups)." << "\n";
- cout << "Example collect.shared(label=unique-.01-.03, line=0-5-10, freq=10, jumble=1, groups=B-C, calc=sharedChao-sharedAce-sharedJabund-sharedSorensonAbund-sharedJclass-sharedSorClass-sharedJest-sharedSorEst-SharedThetaYC-SharedThetaN)." << "\n";
- cout << "The default values for jumble is 1 (meaning jumble, if it’s set to 0 then it will not jumble), freq is 100 and calc are sharedsobs-sharedChao-sharedAce-sharedJabund-sharedSorensonAbund-sharedJclass-sharedSorClass-sharedJest-sharedSorEst-SharedThetaYC-SharedThetaN." << "\n";
+ cout << "Example collect.shared(label=unique-.01-.03, line=0-5-10, freq=10, jumble=1, groups=B-C, calc=sharedChao-sharedAce-Jabund-SorensonAbund-Jclass-SorClass-Jest-SorEst-ThetaYC-ThetaN)." << "\n";
+ cout << "The default values for jumble is 1 (meaning jumble, if it’s set to 0 then it will not jumble), freq is 100 and calc are sharedsobs-sharedChao-sharedAce-Jabund-SorensonAbund-Jclass-SorClass-Jest-SorEst-ThetaYC-ThetaN." << "\n";
cout << "The default value for groups is all the groups in your groupfile." << "\n";
cout << "The label and line parameters are used to analyze specific lines in your input." << "\n";
cout << "The groups parameter allows you to specify which of the groups in your groupfile you would like analyzed. You must enter at least 2 valid groups." << "\n";
cout << "both the line and label parameters at the same time. The summary.single command should be in the following format: " << "\n";
cout << "summary.single(label=yourLabel, line=yourLines, calc=yourEstimators)." << "\n";
cout << "Example summary.single(label=unique-.01-.03, line=0,5,10, calc=sobs-chao-ace-jack-bootstrap-shannon-npshannon-simpson)." << "\n";
- cout << "The default value calc is sobs-chao-ace-jack-bootstrap-shannon-npshannon-simpson" << "\n";
+ cout << "The default value calc is sobs-chao-ace-jack-shannon-npshannon-simpson" << "\n";
cout << "The label and line parameters are used to analyze specific lines in your input." << "\n";
cout << "Note: No spaces between parameter labels (i.e. line), '=' and parameters (i.e.yourLines)." << "\n" << "\n";
}else if (globaldata->helpRequest == "summary.shared") {
cout << "The summary.shared command parameters are label, line, jumble and calc. No parameters are required, but you may not use " << "\n";
cout << "both the line and label parameters at the same time. The summary.shared command should be in the following format: " << "\n";
cout << "summary.shared(label=yourLabel, line=yourLines, jumble=yourJumble, calc=yourEstimators, groups=yourGroups)." << "\n";
- cout << "Example summary.shared(label=unique-.01-.03, line=0,5,10, jumble=1, groups=B-C, calc=sharedChao-sharedAce-sharedJabund-sharedSorensonAbund-sharedJclass-sharedSorClass-sharedJest-sharedSorEst-SharedThetaYC-SharedThetaN)." << "\n";
- cout << "The default value for jumble is 1 (meaning jumble, if it’s set to 0 then it will not jumble) and calc is sharedsobs-sharedChao-sharedAce-sharedJabund-sharedSorensonAbund-sharedJclass-sharedSorClass-sharedJest-sharedSorEst-SharedThetaYC-SharedThetaN" << "\n";
+ cout << "Example summary.shared(label=unique-.01-.03, line=0,5,10, jumble=1, groups=B-C, calc=sharedChao-sharedAce-Jabund-SorensonAbund-Jclass-SorClass-Jest-SorEst-ThetaYC-ThetaN)." << "\n";
+ cout << "The default value for jumble is 1 (meaning jumble, if it’s set to 0 then it will not jumble) and calc is sharedsobs-sharedChao-sharedAce-Jabund-SorensonAbund-Jclass-SorClass-Jest-SorEst-ThetaYC-ThetaN" << "\n";
cout << "The default value for groups is all the groups in your groupfile." << "\n";
cout << "The label and line parameters are used to analyze specific lines in your input." << "\n";
cout << "The groups parameter allows you to specify which of the groups in your groupfile you would like analyzed. You must enter at least 2 valid groups." << "\n";
/***********************************************************************/
-EstOutput SharedAnderberg::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) {
+EstOutput Anderberg::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) {
try {
int S1, S2, S12, tempA, tempB;
S1 = 0; S2 = 0; S12 = 0; tempA = 0; tempB = 0;
return data;
}
catch(exception& e) {
- cout << "Standard Error: " << e.what() << " has occurred in the SharedAnderberg class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+ cout << "Standard Error: " << e.what() << " has occurred in the Anderberg class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
exit(1);
}
catch(...) {
- cout << "An unknown error has occurred in the SharedAnderberg class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+ cout << "An unknown error has occurred in the Anderberg class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
exit(1);
}
}
-#ifndef SHAREDANDERBERG_H
-#define SHAREDANDERBERG_H
+#ifndef ANDERBERG_H
+#define ANDERBERG_H
/*
* sharedanderberg.h
* Mothur
/***********************************************************************/
-class SharedAnderberg : public Calculator {
+class Anderberg : public Calculator {
public:
- SharedAnderberg() : Calculator("SharedAnderberg", 1) {};
+ Anderberg() : Calculator("Anderberg", 1) {};
EstOutput getValues(SAbundVector*) {return data;};
EstOutput getValues(SharedRAbundVector*, SharedRAbundVector*);
private:
/***********************************************************************/
-double SharedBDiversity::whitt(SharedRAbundVector* shared1, SharedRAbundVector* shared2){
+double BDiversity::whitt(SharedRAbundVector* shared1, SharedRAbundVector* shared2){
double nz1 = (double)shared1->numNZ();
double nz2 = (double)shared2->numNZ();
double sum = nz1;
/***********************************************************************/
-double SharedBDiversity::ms(SharedRAbundVector* shared1, SharedRAbundVector* shared2){
+double BDiversity::ms(SharedRAbundVector* shared1, SharedRAbundVector* shared2){
double a = 0;
double b = 0;
double c = 0;
/***********************************************************************/
-double SharedBDiversity::sor(SharedRAbundVector* shared1, SharedRAbundVector* shared2){
+double BDiversity::sor(SharedRAbundVector* shared1, SharedRAbundVector* shared2){
double sum = 0;
double asum = 0;
double bsum = 0;
/***********************************************************************/
-double SharedBDiversity::mor(SharedRAbundVector* shared1, SharedRAbundVector* shared2){
+double BDiversity::mor(SharedRAbundVector* shared1, SharedRAbundVector* shared2){
double multSum = 0;
double powSum1 = 0;
double powSum2 = 0;
}
/***********************************************************************/
-EstOutput SharedBDiversity::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2){
+EstOutput BDiversity::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2){
try {
data.resize(4,0);
}
catch(exception& e) {
- cout << "Standard Error: " << e.what() << " has occurred in the NPShannon class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+ cout << "Standard Error: " << e.what() << " has occurred in the BDiversity class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
exit(1);
}
catch(...) {
- cout << "An unknown error has occurred in the NPShannon class function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+ cout << "An unknown error has occurred in the BDiversity class function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
exit(1);
}
}
-#ifndef SHAREDBDIVERSITY_H
-#define SHAREDBDIVERSITY_H
+#ifndef BDIVERSITY_H
+#define BDIVERSITY_H
/*
* bdiversity.h
* Mothur
/***********************************************************************/
-class SharedBDiversity : public Calculator {
+class BDiversity : public Calculator {
public:
- SharedBDiversity() : Calculator("sharedbdiversity", 3) {};
+ BDiversity() : Calculator("bdiversity", 3) {};
EstOutput getValues(SAbundVector*) {return data;};
EstOutput getValues(SharedRAbundVector*, SharedRAbundVector*);
private:
/***********************************************************************/
//This is used by SharedJAbund and SharedSorAbund
-EstOutput SharedBrayCurtis::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) {
+EstOutput BrayCurtis::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) {
try {
EstOutput data;
data.resize(1,0);
return data;
}
catch(exception& e) {
- cout << "Standard Error: " << e.what() << " has occurred in the SharedBrayCurtis class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+ cout << "Standard Error: " << e.what() << " has occurred in the BrayCurtis class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
exit(1);
}
catch(...) {
- cout << "An unknown error has occurred in the SharedBrayCurtis class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+ cout << "An unknown error has occurred in the BrayCurtis class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
exit(1);
}
-#ifndef SHAREDBRAYCURTIS_H
-#define SHAREDBRAYCURTIS_H
+#ifndef BRAYCURTIS_H
+#define BRAYCURTIS_H
/*
* sharedbraycurtis.h
* Mothur
/***********************************************************************/
-class SharedBrayCurtis : public Calculator {
+class BrayCurtis : public Calculator {
public:
- SharedBrayCurtis() : Calculator("SharedBrayCurtis", 1) {};
+ BrayCurtis() : Calculator("BrayCurtis", 1) {};
EstOutput getValues(SAbundVector*) {return data;};
EstOutput getValues(SharedRAbundVector*, SharedRAbundVector*);
private:
/***********************************************************************/
-EstOutput SharedJAbund::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) {
+EstOutput JAbund::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) {
try {
EstOutput UVest;
UVest.resize(2,0);
return data;
}
catch(exception& e) {
- cout << "Standard Error: " << e.what() << " has occurred in the SharedJAbund class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+ cout << "Standard Error: " << e.what() << " has occurred in the JAbund class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
exit(1);
}
catch(...) {
- cout << "An unknown error has occurred in the SharedJAbund class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+ cout << "An unknown error has occurred in the JAbund class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
exit(1);
}
}
-#ifndef SHAREDJABUND_H
-#define SHAREDJABUND_H
+#ifndef JABUND_H
+#define JABUND_H
/*
* sharedjabund.h
* Dotur
/***********************************************************************/
-class SharedJAbund : public Calculator {
+class JAbund : public Calculator {
public:
- SharedJAbund() : Calculator("SharedJAbund", 3) {};
+ JAbund() : Calculator("JAbund", 3) {};
EstOutput getValues(SAbundVector*) {return data;};
EstOutput getValues(SharedRAbundVector*, SharedRAbundVector*);
private:
/***********************************************************************/
-EstOutput SharedJclass::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) {
+EstOutput Jclass::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) {
try {
int S1, S2, S12, tempA, tempB;
S1 = 0; S2 = 0; S12 = 0; tempA = 0; tempB = 0;
return data;
}
catch(exception& e) {
- cout << "Standard Error: " << e.what() << " has occurred in the SharedJclass class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+ cout << "Standard Error: " << e.what() << " has occurred in the Jclass class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
exit(1);
}
catch(...) {
- cout << "An unknown error has occurred in the SharedJclass class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+ cout << "An unknown error has occurred in the Jclass class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
exit(1);
}
}
-#ifndef SHAREDJCLASS_H
-#define SHAREDJCLASS_H
+#ifndef JCLASS_H
+#define JCLASS_H
/*
* sharedjclass.h
* Dotur
/***********************************************************************/
-class SharedJclass : public Calculator {
+class Jclass : public Calculator {
public:
- SharedJclass() : Calculator("SharedJclass", 3) {};
+ Jclass() : Calculator("Jclass", 3) {};
EstOutput getValues(SAbundVector*) {return data;};
EstOutput getValues(SharedRAbundVector*, SharedRAbundVector*);
private:
/***********************************************************************/
-EstOutput SharedJest::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) {
+EstOutput Jest::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) {
try {
EstOutput S1, S2, S12;
S12.resize(1,0);
return data;
}
catch(exception& e) {
- cout << "Standard Error: " << e.what() << " has occurred in the SharedJest class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+ cout << "Standard Error: " << e.what() << " has occurred in the Jest class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
exit(1);
}
catch(...) {
- cout << "An unknown error has occurred in the SharedJest class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+ cout << "An unknown error has occurred in the Jest class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
exit(1);
}
}
-#ifndef SHAREDJEST_H
-#define SHAREDJEST_H
+#ifndef JEST_H
+#define JEST_H
/*
* sharedjest.h
* Dotur
/***********************************************************************/
-class SharedJest : public Calculator {
+class Jest : public Calculator {
public:
- SharedJest() : Calculator("SharedJest", 3) {};
+ Jest() : Calculator("Jest", 3) {};
EstOutput getValues(SAbundVector*) {return data;};
EstOutput getValues(SharedRAbundVector*, SharedRAbundVector*);
private:
/***********************************************************************/
-EstOutput SharedKSTest::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2){
+EstOutput KSTest::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2){
try {
data.resize(2,0);
return data;
}
catch(exception& e) {
- cout << "Standard Error: " << e.what() << " has occurred in the NPShannon class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+ cout << "Standard Error: " << e.what() << " has occurred in the KSTest class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
exit(1);
}
catch(...) {
- cout << "An unknown error has occurred in the NPShannon class function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+ cout << "An unknown error has occurred in the KSTest class function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
exit(1);
}
}
-#ifndef SHAREDKSTEST_H
-#define SHAREDKSTEST_H
+#ifndef KSTEST_H
+#define KSTEST_H
/*
* kstest.h
* Mothur
/***********************************************************************/
-class SharedKSTest : public Calculator {
+class KSTest : public Calculator {
public:
- SharedKSTest() : Calculator("sharedkstest", 3) {};
+ KSTest() : Calculator("kstest", 3) {};
EstOutput getValues(SAbundVector*) {return data;};
EstOutput getValues(SharedRAbundVector*, SharedRAbundVector*);
private:
/***********************************************************************/
-EstOutput SharedKulczynski::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) {
+EstOutput Kulczynski::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) {
try {
int S1, S2, S12, tempA, tempB;
S1 = 0; S2 = 0; S12 = 0; tempA = 0; tempB = 0;
return data;
}
catch(exception& e) {
- cout << "Standard Error: " << e.what() << " has occurred in the SharedKulczynski class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+ cout << "Standard Error: " << e.what() << " has occurred in the Kulczynski class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
exit(1);
}
catch(...) {
- cout << "An unknown error has occurred in the SharedKulczynski class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+ cout << "An unknown error has occurred in the Kulczynski class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
exit(1);
}
}
-#ifndef SHAREDKULCZYNSKI_H
-#define SHAREDKULCZYNSKI_H
+#ifndef KULCZYNSKI_H
+#define KULCZYNSKI_H
/*
* sharedkulczynski.h
* Mothur
/***********************************************************************/
-class SharedKulczynski : public Calculator {
+class Kulczynski : public Calculator {
public:
- SharedKulczynski() : Calculator("SharedKulczynski", 1) {};
+ Kulczynski() : Calculator("Kulczynski", 1) {};
EstOutput getValues(SAbundVector*) {return data;};
EstOutput getValues(SharedRAbundVector*, SharedRAbundVector*);
private:
/***********************************************************************/
-EstOutput SharedKulczynskiCody::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) {
+EstOutput KulczynskiCody::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) {
try {
int S1, S2, S12, tempA, tempB;
S1 = 0; S2 = 0; S12 = 0; tempA = 0; tempB = 0;
return data;
}
catch(exception& e) {
- cout << "Standard Error: " << e.what() << " has occurred in the SharedKulczynskiCody class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+ cout << "Standard Error: " << e.what() << " has occurred in the KulczynskiCody class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
exit(1);
}
catch(...) {
- cout << "An unknown error has occurred in the SharedKulczynskiCody class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+ cout << "An unknown error has occurred in the KulczynskiCody class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
exit(1);
}
}
-#ifndef SHAREDKULCZYNSKICODY_H
-#define SHAREDKULCZYNSKICODY_H
+#ifndef KULCZYNSKICODY_H
+#define KULCZYNSKICODY_H
/*
* sharedkulczynskicody.h
/***********************************************************************/
-class SharedKulczynskiCody : public Calculator {
+class KulczynskiCody : public Calculator {
public:
- SharedKulczynskiCody() : Calculator("SharedKulczynskiCody", 1) {};
+ KulczynskiCody() : Calculator("KulczynskiCody", 1) {};
EstOutput getValues(SAbundVector*) {return data;};
EstOutput getValues(SharedRAbundVector*, SharedRAbundVector*);
private:
/***********************************************************************/
-EstOutput SharedLennon::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) {
+EstOutput Lennon::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) {
try {
int S1, S2, S12, tempA, tempB, min;
S1 = 0; S2 = 0; S12 = 0; tempA = 0; tempB = 0; min = 0;
return data;
}
catch(exception& e) {
- cout << "Standard Error: " << e.what() << " has occurred in the SharedLennon class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+ cout << "Standard Error: " << e.what() << " has occurred in the Lennon class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
exit(1);
}
catch(...) {
- cout << "An unknown error has occurred in the SharedLennon class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+ cout << "An unknown error has occurred in the Lennon class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
exit(1);
}
}
-#ifndef SHAREDLENNON_H
-#define SHAREDLENNON_H
+#ifndef LENNON_H
+#define LENNON_H
/*
* sharedlennon.h
/***********************************************************************/
-class SharedLennon : public Calculator {
+class Lennon : public Calculator {
public:
- SharedLennon() : Calculator("SharedLennon", 1) {};
+ Lennon() : Calculator("Lennon", 1) {};
EstOutput getValues(SAbundVector*) {return data;};
EstOutput getValues(SharedRAbundVector*, SharedRAbundVector*);
private:
#include "sharedmorisitahorn.h"
/***********************************************************************/
-EstOutput SharedMorHorn::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) {
+EstOutput MorHorn::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) {
try {
data.resize(1,0);
return data;
}
catch(exception& e) {
- cout << "Standard Error: " << e.what() << " has occurred in the SharedMorHorn class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+ cout << "Standard Error: " << e.what() << " has occurred in the MorHorn class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
exit(1);
}
catch(...) {
- cout << "An unknown error has occurred in the SharedMorHorn class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+ cout << "An unknown error has occurred in the MorHorn class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
exit(1);
}
}
-#ifndef SHAREDMORHORN_H
-#define SHAREDMORHORN_H
+#ifndef MORHORN_H
+#define MORHORN_H
/*
* sharedmorisitahorn.h
* Mothur
/***********************************************************************/
-class SharedMorHorn : public Calculator {
+class MorHorn : public Calculator {
public:
- SharedMorHorn() : Calculator("SharedMorisitaHorn", 1) {};
+ MorHorn() : Calculator("MorisitaHorn", 1) {};
EstOutput getValues(SAbundVector*) {return data;};
EstOutput getValues(SharedRAbundVector*, SharedRAbundVector*);
private:
/***********************************************************************/
-EstOutput SharedOchiai::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) {
+EstOutput Ochiai::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) {
try {
int S1, S2, S12, tempA, tempB;
S1 = 0; S2 = 0; S12 = 0; tempA = 0; tempB = 0;
return data;
}
catch(exception& e) {
- cout << "Standard Error: " << e.what() << " has occurred in the SharedOchiai class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+ cout << "Standard Error: " << e.what() << " has occurred in the Ochiai class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
exit(1);
}
catch(...) {
- cout << "An unknown error has occurred in the SharedOchiai class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+ cout << "An unknown error has occurred in the Ochiai class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
exit(1);
}
}
-#ifndef SHAREDOCHIAI_H
-#define SHAREDOCHIAI_H
+#ifndef OCHIAI_H
+#define OCHIAI_H
/*
* sharedochiai.h
* Mothur
/***********************************************************************/
-class SharedOchiai : public Calculator {
+class Ochiai : public Calculator {
public:
- SharedOchiai() : Calculator("SharedOchiai", 1) {};
+ Ochiai() : Calculator("Ochiai", 1) {};
EstOutput getValues(SAbundVector*) {return data;};
EstOutput getValues(SharedRAbundVector*, SharedRAbundVector*);
private:
/***********************************************************************/
-EstOutput SharedSorAbund::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) {
+EstOutput SorAbund::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) {
try {
EstOutput UVest;
UVest.resize(2,0);
return data;
}
catch(exception& e) {
- cout << "Standard Error: " << e.what() << " has occurred in the SharedSorAbund class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+ cout << "Standard Error: " << e.what() << " has occurred in the SorAbund class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
exit(1);
}
catch(...) {
- cout << "An unknown error has occurred in the SharedSorAbund class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+ cout << "An unknown error has occurred in the SorAbund class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
exit(1);
}
}
-#ifndef SHAREDSORABUND_H
-#define SHAREDSORABUND_H
+#ifndef SORABUND_H
+#define SORABUND_H
/*
* sharedsorabund.h
* Dotur
/***********************************************************************/
-class SharedSorAbund : public Calculator {
+class SorAbund : public Calculator {
public:
- SharedSorAbund() : Calculator("SharedSorAbund", 3) {};
+ SorAbund() : Calculator("SorAbund", 3) {};
EstOutput getValues(SAbundVector*) {return data;};
EstOutput getValues(SharedRAbundVector*, SharedRAbundVector*);
private:
/***********************************************************************/
-EstOutput SharedSorClass::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) {
+EstOutput SorClass::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) {
try {
int S1, S2, S12, tempA, tempB;
S1 = 0; S2 = 0; S12 = 0; tempA = 0; tempB = 0;
return data;
}
catch(exception& e) {
- cout << "Standard Error: " << e.what() << " has occurred in the SharedSorClass class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+ cout << "Standard Error: " << e.what() << " has occurred in the SorClass class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
exit(1);
}
catch(...) {
- cout << "An unknown error has occurred in the SharedSorClass class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+ cout << "An unknown error has occurred in the SorClass class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
exit(1);
}
}
-#ifndef SHAREDSORCLASS_H
-#define SHAREDSORCLASS_H
+#ifndef SORCLASS_H
+#define SORCLASS_H
/*
* sharedsorclass.h
* Dotur
/***********************************************************************/
-class SharedSorClass : public Calculator {
+class SorClass : public Calculator {
public:
- SharedSorClass() : Calculator("SharedSorClass", 3) {};
+ SorClass() : Calculator("SorClass", 3) {};
EstOutput getValues(SAbundVector*) {return data;};
EstOutput getValues(SharedRAbundVector*, SharedRAbundVector*);
private:
/***********************************************************************/
-EstOutput SharedSorEst::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) {
+EstOutput SorEst::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) {
try {
EstOutput S1, S2, S12;
S12.resize(1,0);
return data;
}
catch(exception& e) {
- cout << "Standard Error: " << e.what() << " has occurred in the SharedSorEst class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+ cout << "Standard Error: " << e.what() << " has occurred in the SorEst class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
exit(1);
}
catch(...) {
- cout << "An unknown error has occurred in the SharedSorEst class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+ cout << "An unknown error has occurred in the SorEst class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
exit(1);
}
}
-#ifndef SHAREDSOREST_H
-#define SHAREDSOREST_H
+#ifndef SOREST_H
+#define SOREST_H
/*
* sharedsorest.h
* Dotur
/***********************************************************************/
-class SharedSorEst : public Calculator {
+class SorEst : public Calculator {
public:
- SharedSorEst() : Calculator("SharedSorEst", 3) {};
+ SorEst() : Calculator("SorEst", 3) {};
EstOutput getValues(SAbundVector*) {return data;};
EstOutput getValues(SharedRAbundVector*, SharedRAbundVector*);
private:
#include "sharedthetan.h"
/***********************************************************************/
-EstOutput SharedThetaN::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) {
+EstOutput ThetaN::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) {
try {
data.resize(1,0);
return data;
}
catch(exception& e) {
- cout << "Standard Error: " << e.what() << " has occurred in the SharedThetaN class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+ cout << "Standard Error: " << e.what() << " has occurred in the ThetaN class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
exit(1);
}
catch(...) {
- cout << "An unknown error has occurred in the SharedThetaN class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+ cout << "An unknown error has occurred in the ThetaN class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
exit(1);
}
}
-#ifndef SHAREDTHETAN_H
-#define SHAREDTHETAN_H
+#ifndef THETAN_H
+#define THETAN_H
/*
* sharedthetan.h
* Dotur
/***********************************************************************/
-class SharedThetaN : public Calculator {
+class ThetaN : public Calculator {
public:
- SharedThetaN() : Calculator("SharedThetaN", 3) {};
+ ThetaN() : Calculator("ThetaN", 3) {};
EstOutput getValues(SAbundVector*) {return data;};
EstOutput getValues(SharedRAbundVector*, SharedRAbundVector*);
private:
#include "sharedthetayc.h"
/***********************************************************************/
-EstOutput SharedThetaYC::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) {
+EstOutput ThetaYC::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) {
try {
data.resize(1,0);
return data;
}
catch(exception& e) {
- cout << "Standard Error: " << e.what() << " has occurred in the SharedThetaYC class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+ cout << "Standard Error: " << e.what() << " has occurred in the ThetaYC class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
exit(1);
}
catch(...) {
- cout << "An unknown error has occurred in the SharedThetaYC class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+ cout << "An unknown error has occurred in the ThetaYC class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
exit(1);
}
}
-#ifndef SHAREDTHETAYC_H
-#define SHAREDTHETAYC_H
+#ifndef THETAYC_H
+#define THETAYC_H
/*
* sharedthetayc.h
* Dotur
/***********************************************************************/
-class SharedThetaYC : public Calculator {
+class ThetaYC : public Calculator {
public:
- SharedThetaYC() : Calculator("SharedThetaYC", 3) {};
+ ThetaYC() : Calculator("ThetaYC", 3) {};
EstOutput getValues(SAbundVector*) {return data;};
EstOutput getValues(SharedRAbundVector*, SharedRAbundVector*);
private:
sumCalculators.push_back(new SharedChao1());
}else if (globaldata->Estimators[i] == "sharedace") {
sumCalculators.push_back(new SharedAce());
- }else if (globaldata->Estimators[i] == "sharedjabund") {
- sumCalculators.push_back(new SharedJAbund());
- }else if (globaldata->Estimators[i] == "sharedsorensonabund") {
- sumCalculators.push_back(new SharedSorAbund());
- }else if (globaldata->Estimators[i] == "sharedjclass") {
- sumCalculators.push_back(new SharedJclass());
- }else if (globaldata->Estimators[i] == "sharedsorclass") {
- sumCalculators.push_back(new SharedSorClass());
- }else if (globaldata->Estimators[i] == "sharedjest") {
- sumCalculators.push_back(new SharedJest());
- }else if (globaldata->Estimators[i] == "sharedsorest") {
- sumCalculators.push_back(new SharedSorEst());
- }else if (globaldata->Estimators[i] == "sharedthetayc") {
- sumCalculators.push_back(new SharedThetaYC());
- }else if (globaldata->Estimators[i] == "sharedthetan") {
- sumCalculators.push_back(new SharedThetaN());
- }else if (globaldata->Estimators[i] == "sharedkstest") {
- sumCalculators.push_back(new SharedKSTest());
+ }else if (globaldata->Estimators[i] == "jabund") {
+ sumCalculators.push_back(new JAbund());
+ }else if (globaldata->Estimators[i] == "sorensonabund") {
+ sumCalculators.push_back(new SorAbund());
+ }else if (globaldata->Estimators[i] == "jclass") {
+ sumCalculators.push_back(new Jclass());
+ }else if (globaldata->Estimators[i] == "sorclass") {
+ sumCalculators.push_back(new SorClass());
+ }else if (globaldata->Estimators[i] == "jest") {
+ sumCalculators.push_back(new Jest());
+ }else if (globaldata->Estimators[i] == "sorest") {
+ sumCalculators.push_back(new SorEst());
+ }else if (globaldata->Estimators[i] == "thetayc") {
+ sumCalculators.push_back(new ThetaYC());
+ }else if (globaldata->Estimators[i] == "thetan") {
+ sumCalculators.push_back(new ThetaN());
+ }else if (globaldata->Estimators[i] == "kstest") {
+ sumCalculators.push_back(new KSTest());
}else if (globaldata->Estimators[i] == "sharednseqs") {
sumCalculators.push_back(new SharedNSeqs());
- }else if (globaldata->Estimators[i] == "sharedochiai") {
- sumCalculators.push_back(new SharedOchiai());
- }else if (globaldata->Estimators[i] == "sharedanderberg") {
- sumCalculators.push_back(new SharedAnderberg());
- }else if (globaldata->Estimators[i] == "sharedkulczynski") {
- sumCalculators.push_back(new SharedKulczynski());
- }else if (globaldata->Estimators[i] == "sharedkulczynskicody") {
- sumCalculators.push_back(new SharedKulczynskiCody());
- }else if (globaldata->Estimators[i] == "sharedlennon") {
- sumCalculators.push_back(new SharedLennon());
- }else if (globaldata->Estimators[i] == "sharedmorisitahorn") {
- sumCalculators.push_back(new SharedMorHorn());
- }else if (globaldata->Estimators[i] == "sharedbraycurtis") {
- sumCalculators.push_back(new SharedBrayCurtis());
+ }else if (globaldata->Estimators[i] == "ochiai") {
+ sumCalculators.push_back(new Ochiai());
+ }else if (globaldata->Estimators[i] == "anderberg") {
+ sumCalculators.push_back(new Anderberg());
+ }else if (globaldata->Estimators[i] == "kulczynski") {
+ sumCalculators.push_back(new Kulczynski());
+ }else if (globaldata->Estimators[i] == "kulczynskicody") {
+ sumCalculators.push_back(new KulczynskiCody());
+ }else if (globaldata->Estimators[i] == "lennon") {
+ sumCalculators.push_back(new Lennon());
+ }else if (globaldata->Estimators[i] == "morisitahorn") {
+ sumCalculators.push_back(new MorHorn());
+ }else if (globaldata->Estimators[i] == "braycurtis") {
+ sumCalculators.push_back(new BrayCurtis());
}
- else if (globaldata->Estimators[i] == "sharedbdiversity") {
- sumCalculators.push_back(new SharedBDiversity());
+ else if (globaldata->Estimators[i] == "bdiversity") {
+ sumCalculators.push_back(new BDiversity());
}
}
int i;
for (i=0; i<globaldata->Estimators.size(); i++) {
if (validCalculator->isValidCalculator("treegroup", globaldata->Estimators[i]) == true) {
- if (globaldata->Estimators[i] == "sharedjabund") {
- treeCalculators.push_back(new SharedJAbund());
- }else if (globaldata->Estimators[i] == "sharedsorensonabund") {
- treeCalculators.push_back(new SharedSorAbund());
- }else if (globaldata->Estimators[i] == "sharedjclass") {
- treeCalculators.push_back(new SharedJclass());
- }else if (globaldata->Estimators[i] == "sharedsorclass") {
- treeCalculators.push_back(new SharedSorClass());
- }else if (globaldata->Estimators[i] == "sharedjest") {
- treeCalculators.push_back(new SharedJest());
- }else if (globaldata->Estimators[i] == "sharedsorest") {
- treeCalculators.push_back(new SharedSorEst());
- }else if (globaldata->Estimators[i] == "sharedthetayc") {
- treeCalculators.push_back(new SharedThetaYC());
- }else if (globaldata->Estimators[i] == "sharedthetan") {
- treeCalculators.push_back(new SharedThetaN());
- }else if (globaldata->Estimators[i] == "sharedmorisitahorn") {
- treeCalculators.push_back(new SharedMorHorn());
+ if (globaldata->Estimators[i] == "jabund") {
+ treeCalculators.push_back(new JAbund());
+ }else if (globaldata->Estimators[i] == "sorensonabund") {
+ treeCalculators.push_back(new SorAbund());
+ }else if (globaldata->Estimators[i] == "jclass") {
+ treeCalculators.push_back(new Jclass());
+ }else if (globaldata->Estimators[i] == "sorclass") {
+ treeCalculators.push_back(new SorClass());
+ }else if (globaldata->Estimators[i] == "jest") {
+ treeCalculators.push_back(new Jest());
+ }else if (globaldata->Estimators[i] == "sorest") {
+ treeCalculators.push_back(new SorEst());
+ }else if (globaldata->Estimators[i] == "thetayc") {
+ treeCalculators.push_back(new ThetaYC());
+ }else if (globaldata->Estimators[i] == "thetan") {
+ treeCalculators.push_back(new ThetaN());
+ }else if (globaldata->Estimators[i] == "morisitahorn") {
+ treeCalculators.push_back(new MorHorn());
}
}
}
single["logsd"] = "logsd";
single["qstat"] = "qstat";
single["bstick"] = "bstick";
- single["nseqs"] = "nseqs";
+ single["nseqs"] = "nseqs";
single["default"] = "default";
}
catch(exception& e) {
shared["sharedsobs"] = "sharedsobs";
shared["sharedchao"] = "sharedchao";
shared["sharedace"] = "sharedace";
- shared["sharedjabund"] = "sharedjabund";
- shared["sharedsorensonabund"] = "sharedsorensonabund";
- shared["sharedjclass"] = "sharedjclass";
- shared["sharedsorclass"] = "sharedsorclass";
- shared["sharedjest"] = "sharedjest";
- shared["sharedsorest"] = "sharedsorest";
- shared["sharedthetayc"] = "sharedthetayc";
- shared["sharedthetan"] = "sharedthetan";
- shared["sharedkstest"] = "sharedkstest";
- shared["sharedbdiversity"] = "sharedbdiversity";
+ shared["jabund"] = "jabund";
+ shared["sorensonabund"] = "sorensonabund";
+ shared["jclass"] = "jclass";
+ shared["sorclass"] = "sorclass";
+ shared["jest"] = "jest";
+ shared["sorest"] = "sorest";
+ shared["thetayc"] = "thetayc";
+ shared["thetan"] = "thetan";
+ shared["kstest"] = "kstest";
+ shared["bdiversity"] = "bdiversity";
shared["sharednseqs"] = "sharednseqs";
- shared["sharedochiai"] = "sharedochiai";
- shared["sharedanderberg"] = "sharedanderberg";
- shared["sharedkulczynski"] = "sharedkulczynski";
- shared["sharedkulczynskicody"] = "sharedkulczynskicody";
- shared["sharedlennon"] = "sharedlennon";
- shared["sharedmorisitahorn"] = "sharedmorisitahorn";
- shared["sharedbraycurtis"] = "sharedbraycurtis";
+ shared["ochiai"] = "ochiai";
+ shared["anderberg"] = "anderberg";
+ shared["kulczynski"] = "kulczynski";
+ shared["kulczynskicody"] = "kulczynskicody";
+ shared["lennon"] = "lennon";
+ shared["morisitahorn"] = "morisitahorn";
+ shared["braycurtis"] = "braycurtis";
shared["default"] = "default";
}
catch(exception& e) {
sharedsummary["sharedsobs"] = "sharedsobs";
sharedsummary["sharedchao"] = "sharedchao";
sharedsummary["sharedace"] = "sharedace";
- sharedsummary["sharedjabund"] = "sharedjabund";
- sharedsummary["sharedsorensonabund"] = "sharedsorensonabund";
- sharedsummary["sharedjclass"] = "sharedjclass";
- sharedsummary["sharedsorclass"] = "sharedsorclass";
- sharedsummary["sharedjest"] = "sharedjest";
- sharedsummary["sharedsorest"] = "sharedsorest";
- sharedsummary["sharedthetayc"] = "sharedthetayc";
- sharedsummary["sharedthetan"] = "sharedthetan";
- sharedsummary["sharedkstest"] = "sharedkstest";
- sharedsummary["sharedbdiversity"] = "sharedbdiversity";
+ sharedsummary["jabund"] = "jabund";
+ sharedsummary["sorensonabund"] = "sorensonabund";
+ sharedsummary["jclass"] = "jclass";
+ sharedsummary["sorclass"] = "sorclass";
+ sharedsummary["jest"] = "jest";
+ sharedsummary["sorest"] = "sorest";
+ sharedsummary["thetayc"] = "thetayc";
+ sharedsummary["thetan"] = "thetan";
+ sharedsummary["kstest"] = "kstest";
+ sharedsummary["bdiversity"] = "bdiversity";
sharedsummary["sharednseqs"] = "sharednseqs";
- sharedsummary["sharedochiai"] = "sharedochiai";
- sharedsummary["sharedanderberg"] = "sharedanderberg";
- sharedsummary["sharedkulczynski"] = "sharedkulczynski";
- sharedsummary["sharedkulczynskicody"] = "sharedkulczynskicody";
- sharedsummary["sharedlennon"] = "sharedlennon";
- sharedsummary["sharedmorisitahorn"] = "sharedmorisitahorn";
- sharedsummary["sharedbraycurtis"] = "sharedbraycurtis";
+ sharedsummary["ochiai"] = "ochiai";
+ sharedsummary["anderberg"] = "anderberg";
+ sharedsummary["kulczynski"] = "kulczynski";
+ sharedsummary["kulczynskicody"] = "kulczynskicody";
+ sharedsummary["lennon"] = "lennon";
+ sharedsummary["morisitahorn"] = "morisitahorn";
+ sharedsummary["braycurtis"] = "braycurtis";
sharedsummary["default"] = "default";
}
catch(exception& e) {
try {
vennsingle["sobs"] = "sobs";
vennsingle["chao"] = "chao";
- vennsingle["ace"] = "ace";
+ vennsingle["ace"] = "ace";
vennsingle["jack"] = "jack";
- vennsingle["default"] = "default";
+ vennsingle["default"] = "default";
}
catch(exception& e) {
cout << "Standard Error: " << e.what() << " has occurred in the ValidCalculator class Function initialSingle. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
/********************************************************************/
void ValidCalculators::initialTreeGroups() {
try {
- treegroup["sharedjabund"] = "sharedjabund";
- treegroup["sharedsorensonabund"] = "sharedsorensonabund";
- treegroup["sharedjclass"] = "sharedjclass";
- treegroup["sharedsorclass"] = "sharedsorclass";
- treegroup["sharedjest"] = "sharedjest";
- treegroup["sharedsorest"] = "sharedsorest";
- treegroup["sharedthetayc"] = "sharedthetayc";
- treegroup["sharedthetan"] = "sharedthetan";
- treegroup["sharedmorisitahorn"] = "sharedmorisitahorn";
+ treegroup["jabund"] = "jabund";
+ treegroup["sorensonabund"] = "sorensonabund";
+ treegroup["jclass"] = "jclass";
+ treegroup["sorclass"] = "sorclass";
+ treegroup["jest"] = "jest";
+ treegroup["sorest"] = "sorest";
+ treegroup["thetayc"] = "thetayc";
+ treegroup["thetan"] = "thetan";
+ treegroup["morisitahorn"] = "morisitahorn";
}
catch(exception& e) {
cout << "Standard Error: " << e.what() << " has occurred in the ValidCalculator class Function initialTreeGroups. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";