From: westcott Date: Tue, 14 Apr 2009 17:16:14 +0000 (+0000) Subject: removed "shared" from some of the calculator names and classes X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=commitdiff_plain;h=c537597ec5ebd47b4898da87ae03b0c2aeced354 removed "shared" from some of the calculator names and classes --- diff --git a/binsequencecommand.cpp b/binsequencecommand.cpp index 5db2932..c3c68ab 100644 --- a/binsequencecommand.cpp +++ b/binsequencecommand.cpp @@ -67,7 +67,10 @@ int BinSeqCommand::execute(){ 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); @@ -75,6 +78,11 @@ int BinSeqCommand::execute(){ //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(',')); @@ -83,7 +91,7 @@ int BinSeqCommand::execute(){ //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 { @@ -105,7 +113,9 @@ int BinSeqCommand::execute(){ remove(outputFileName.c_str()); return 0; } + //out.close(); } + out.close(); } list = input->getListVector(); diff --git a/collectsharedcommand.cpp b/collectsharedcommand.cpp index 6c47f2d..41dc573 100644 --- a/collectsharedcommand.cpp +++ b/collectsharedcommand.cpp @@ -52,42 +52,42 @@ CollectSharedCommand::CollectSharedCommand(){ 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"))); } } } diff --git a/getoturepcommand.cpp b/getoturepcommand.cpp index ea53f25..064455f 100644 --- a/getoturepcommand.cpp +++ b/getoturepcommand.cpp @@ -83,7 +83,7 @@ int GetOTURepCommand::execute(){ 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; @@ -96,7 +96,7 @@ int GetOTURepCommand::execute(){ 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 { @@ -105,6 +105,8 @@ int GetOTURepCommand::execute(){ return 0; } } + + out.close(); } list = input->getListVector(); diff --git a/globaldata.cpp b/globaldata.cpp index 6ab20f3..5bc7f58 100644 --- a/globaldata.cpp +++ b/globaldata.cpp @@ -163,7 +163,7 @@ void GlobalData::parseGlobalData(string commandString, string optionText){ //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); } @@ -173,17 +173,17 @@ void GlobalData::parseGlobalData(string commandString, string optionText){ 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); } diff --git a/heatmap.cpp b/heatmap.cpp index d75f6f6..523662e 100644 --- a/heatmap.cpp +++ b/heatmap.cpp @@ -34,41 +34,96 @@ void HeatMap::getPic(OrderVector* order) { 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 << "\n"; + outsvg << "\n"; outsvg << "\n"; - int x = 15; - int y = 15; + //white backround + outsvg << ""; + outsvg << "Heatmap at distance " + order->getLabel() + "\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 << "\n"; + outsvg << "" + label + "\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 << "\n"; y += 5; } - outsvg << "\n\n"; + outsvg << "\n\n"; outsvg.close(); } @@ -102,28 +157,21 @@ void HeatMap::getPic(SharedOrderVector* sharedorder) { 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; @@ -132,7 +180,6 @@ void HeatMap::getPic(SharedOrderVector* sharedorder) { 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"; @@ -151,39 +198,40 @@ void HeatMap::getPic(SharedOrderVector* sharedorder) { outsvg << "getGroup().length() / 2)) + "\" y=\"50\">" + lookup[h]->getGroup() + "\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 << "\n"; - outsvg << "" + itprec + "\n"; - x += 25; + color = toHex(int(((i+1) * colorScaler) + 15)); + outsvg << "\n"; + outsvg << "" + label + "\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. diff --git a/helpcommand.cpp b/helpcommand.cpp index 9e85590..1693807 100644 --- a/helpcommand.cpp +++ b/helpcommand.cpp @@ -76,7 +76,7 @@ int HelpCommand::execute(){ 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") { @@ -84,8 +84,8 @@ int HelpCommand::execute(){ 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"; @@ -136,7 +136,7 @@ int HelpCommand::execute(){ 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") { @@ -144,8 +144,8 @@ int HelpCommand::execute(){ 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"; diff --git a/sharedanderbergs.cpp b/sharedanderbergs.cpp index 77888b5..08ca8fd 100644 --- a/sharedanderbergs.cpp +++ b/sharedanderbergs.cpp @@ -11,7 +11,7 @@ /***********************************************************************/ -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; @@ -40,11 +40,11 @@ EstOutput SharedAnderberg::getValues(SharedRAbundVector* shared1, SharedRAbundVe 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); } } diff --git a/sharedanderbergs.h b/sharedanderbergs.h index 0443d02..1c8d9ce 100644 --- a/sharedanderbergs.h +++ b/sharedanderbergs.h @@ -1,5 +1,5 @@ -#ifndef SHAREDANDERBERG_H -#define SHAREDANDERBERG_H +#ifndef ANDERBERG_H +#define ANDERBERG_H /* * sharedanderberg.h * Mothur @@ -13,10 +13,10 @@ /***********************************************************************/ -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: diff --git a/sharedbdiversity.cpp b/sharedbdiversity.cpp index 3d314c3..d00385d 100644 --- a/sharedbdiversity.cpp +++ b/sharedbdiversity.cpp @@ -11,7 +11,7 @@ /***********************************************************************/ -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; @@ -25,7 +25,7 @@ double SharedBDiversity::whitt(SharedRAbundVector* shared1, SharedRAbundVector* /***********************************************************************/ -double SharedBDiversity::ms(SharedRAbundVector* shared1, SharedRAbundVector* shared2){ +double BDiversity::ms(SharedRAbundVector* shared1, SharedRAbundVector* shared2){ double a = 0; double b = 0; double c = 0; @@ -46,7 +46,7 @@ double SharedBDiversity::ms(SharedRAbundVector* shared1, SharedRAbundVector* sha /***********************************************************************/ -double SharedBDiversity::sor(SharedRAbundVector* shared1, SharedRAbundVector* shared2){ +double BDiversity::sor(SharedRAbundVector* shared1, SharedRAbundVector* shared2){ double sum = 0; double asum = 0; double bsum = 0; @@ -67,7 +67,7 @@ double SharedBDiversity::sor(SharedRAbundVector* shared1, SharedRAbundVector* sh /***********************************************************************/ -double SharedBDiversity::mor(SharedRAbundVector* shared1, SharedRAbundVector* shared2){ +double BDiversity::mor(SharedRAbundVector* shared1, SharedRAbundVector* shared2){ double multSum = 0; double powSum1 = 0; double powSum2 = 0; @@ -87,7 +87,7 @@ double SharedBDiversity::mor(SharedRAbundVector* shared1, SharedRAbundVector* sh } /***********************************************************************/ -EstOutput SharedBDiversity::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2){ +EstOutput BDiversity::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2){ try { data.resize(4,0); @@ -113,11 +113,11 @@ EstOutput SharedBDiversity::getValues(SharedRAbundVector* shared1, SharedRAbundV } 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); } } diff --git a/sharedbdiversity.h b/sharedbdiversity.h index b32d6d8..1a8eb87 100644 --- a/sharedbdiversity.h +++ b/sharedbdiversity.h @@ -1,5 +1,5 @@ -#ifndef SHAREDBDIVERSITY_H -#define SHAREDBDIVERSITY_H +#ifndef BDIVERSITY_H +#define BDIVERSITY_H /* * bdiversity.h * Mothur @@ -15,10 +15,10 @@ It is a child of the calculator class.*/ /***********************************************************************/ -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: diff --git a/sharedbraycurtis.cpp b/sharedbraycurtis.cpp index 3cc3177..0f29b23 100644 --- a/sharedbraycurtis.cpp +++ b/sharedbraycurtis.cpp @@ -11,7 +11,7 @@ /***********************************************************************/ //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); @@ -48,11 +48,11 @@ EstOutput SharedBrayCurtis::getValues(SharedRAbundVector* shared1, SharedRAbundV 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); } diff --git a/sharedbraycurtis.h b/sharedbraycurtis.h index ba36729..bbd09f5 100644 --- a/sharedbraycurtis.h +++ b/sharedbraycurtis.h @@ -1,5 +1,5 @@ -#ifndef SHAREDBRAYCURTIS_H -#define SHAREDBRAYCURTIS_H +#ifndef BRAYCURTIS_H +#define BRAYCURTIS_H /* * sharedbraycurtis.h * Mothur @@ -12,10 +12,10 @@ /***********************************************************************/ -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: diff --git a/sharedjabund.cpp b/sharedjabund.cpp index 1c0b6ed..79a5745 100644 --- a/sharedjabund.cpp +++ b/sharedjabund.cpp @@ -11,7 +11,7 @@ /***********************************************************************/ -EstOutput SharedJAbund::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) { +EstOutput JAbund::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) { try { EstOutput UVest; UVest.resize(2,0); @@ -27,11 +27,11 @@ EstOutput SharedJAbund::getValues(SharedRAbundVector* shared1, SharedRAbundVecto 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); } } diff --git a/sharedjabund.h b/sharedjabund.h index 426f204..5e44243 100644 --- a/sharedjabund.h +++ b/sharedjabund.h @@ -1,5 +1,5 @@ -#ifndef SHAREDJABUND_H -#define SHAREDJABUND_H +#ifndef JABUND_H +#define JABUND_H /* * sharedjabund.h * Dotur @@ -17,10 +17,10 @@ It is a child of the calculator class. */ /***********************************************************************/ -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: diff --git a/sharedjclass.cpp b/sharedjclass.cpp index 2c7d8c9..54d87cc 100644 --- a/sharedjclass.cpp +++ b/sharedjclass.cpp @@ -11,7 +11,7 @@ /***********************************************************************/ -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; @@ -41,11 +41,11 @@ EstOutput SharedJclass::getValues(SharedRAbundVector* shared1, SharedRAbundVecto 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); } } diff --git a/sharedjclass.h b/sharedjclass.h index 301518b..bafc3f7 100644 --- a/sharedjclass.h +++ b/sharedjclass.h @@ -1,5 +1,5 @@ -#ifndef SHAREDJCLASS_H -#define SHAREDJCLASS_H +#ifndef JCLASS_H +#define JCLASS_H /* * sharedjclass.h * Dotur @@ -16,10 +16,10 @@ It is a child of the calculator class. */ /***********************************************************************/ -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: diff --git a/sharedjest.cpp b/sharedjest.cpp index 5a3b6b8..079cdef 100644 --- a/sharedjest.cpp +++ b/sharedjest.cpp @@ -14,7 +14,7 @@ /***********************************************************************/ -EstOutput SharedJest::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) { +EstOutput Jest::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) { try { EstOutput S1, S2, S12; S12.resize(1,0); @@ -46,11 +46,11 @@ EstOutput SharedJest::getValues(SharedRAbundVector* shared1, SharedRAbundVector* 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); } } diff --git a/sharedjest.h b/sharedjest.h index 405e68c..fa1f613 100644 --- a/sharedjest.h +++ b/sharedjest.h @@ -1,5 +1,5 @@ -#ifndef SHAREDJEST_H -#define SHAREDJEST_H +#ifndef JEST_H +#define JEST_H /* * sharedjest.h * Dotur @@ -17,10 +17,10 @@ It is a child of the calculator class. */ /***********************************************************************/ -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: diff --git a/sharedkstest.cpp b/sharedkstest.cpp index 8daa0eb..604f1f6 100644 --- a/sharedkstest.cpp +++ b/sharedkstest.cpp @@ -11,7 +11,7 @@ /***********************************************************************/ -EstOutput SharedKSTest::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2){ +EstOutput KSTest::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2){ try { data.resize(2,0); @@ -65,11 +65,11 @@ EstOutput SharedKSTest::getValues(SharedRAbundVector* shared1, SharedRAbundVecto 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); } } diff --git a/sharedkstest.h b/sharedkstest.h index dfe1c1a..8944025 100644 --- a/sharedkstest.h +++ b/sharedkstest.h @@ -1,5 +1,5 @@ -#ifndef SHAREDKSTEST_H -#define SHAREDKSTEST_H +#ifndef KSTEST_H +#define KSTEST_H /* * kstest.h * Mothur @@ -15,10 +15,10 @@ It is a child of the calculator class.*/ /***********************************************************************/ -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: diff --git a/sharedkulczynski.cpp b/sharedkulczynski.cpp index 30c8c7a..a4a20a7 100644 --- a/sharedkulczynski.cpp +++ b/sharedkulczynski.cpp @@ -11,7 +11,7 @@ /***********************************************************************/ -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; @@ -40,11 +40,11 @@ EstOutput SharedKulczynski::getValues(SharedRAbundVector* shared1, SharedRAbundV 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); } } diff --git a/sharedkulczynski.h b/sharedkulczynski.h index 91a19ca..574ddd5 100644 --- a/sharedkulczynski.h +++ b/sharedkulczynski.h @@ -1,5 +1,5 @@ -#ifndef SHAREDKULCZYNSKI_H -#define SHAREDKULCZYNSKI_H +#ifndef KULCZYNSKI_H +#define KULCZYNSKI_H /* * sharedkulczynski.h * Mothur @@ -14,10 +14,10 @@ /***********************************************************************/ -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: diff --git a/sharedkulczynskicody.cpp b/sharedkulczynskicody.cpp index 3de7e76..66f9d07 100644 --- a/sharedkulczynskicody.cpp +++ b/sharedkulczynskicody.cpp @@ -11,7 +11,7 @@ /***********************************************************************/ -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; @@ -40,11 +40,11 @@ EstOutput SharedKulczynskiCody::getValues(SharedRAbundVector* shared1, SharedRAb 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); } } diff --git a/sharedkulczynskicody.h b/sharedkulczynskicody.h index 7fb30ce..20ac44e 100644 --- a/sharedkulczynskicody.h +++ b/sharedkulczynskicody.h @@ -1,5 +1,5 @@ -#ifndef SHAREDKULCZYNSKICODY_H -#define SHAREDKULCZYNSKICODY_H +#ifndef KULCZYNSKICODY_H +#define KULCZYNSKICODY_H /* * sharedkulczynskicody.h @@ -15,10 +15,10 @@ /***********************************************************************/ -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: diff --git a/sharedlennon.cpp b/sharedlennon.cpp index 45dfc6a..b002a68 100644 --- a/sharedlennon.cpp +++ b/sharedlennon.cpp @@ -11,7 +11,7 @@ /***********************************************************************/ -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; @@ -46,11 +46,11 @@ EstOutput SharedLennon::getValues(SharedRAbundVector* shared1, SharedRAbundVecto 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); } } diff --git a/sharedlennon.h b/sharedlennon.h index 57a6355..51bc9ed 100644 --- a/sharedlennon.h +++ b/sharedlennon.h @@ -1,5 +1,5 @@ -#ifndef SHAREDLENNON_H -#define SHAREDLENNON_H +#ifndef LENNON_H +#define LENNON_H /* * sharedlennon.h @@ -15,10 +15,10 @@ /***********************************************************************/ -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: diff --git a/sharedmorisitahorn.cpp b/sharedmorisitahorn.cpp index 6ceac75..579f56a 100644 --- a/sharedmorisitahorn.cpp +++ b/sharedmorisitahorn.cpp @@ -10,7 +10,7 @@ #include "sharedmorisitahorn.h" /***********************************************************************/ -EstOutput SharedMorHorn::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) { +EstOutput MorHorn::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) { try { data.resize(1,0); @@ -52,11 +52,11 @@ EstOutput SharedMorHorn::getValues(SharedRAbundVector* shared1, SharedRAbundVect 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); } } diff --git a/sharedmorisitahorn.h b/sharedmorisitahorn.h index 9c2f755..dd01dc7 100644 --- a/sharedmorisitahorn.h +++ b/sharedmorisitahorn.h @@ -1,5 +1,5 @@ -#ifndef SHAREDMORHORN_H -#define SHAREDMORHORN_H +#ifndef MORHORN_H +#define MORHORN_H /* * sharedmorisitahorn.h * Mothur @@ -14,10 +14,10 @@ /***********************************************************************/ -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: diff --git a/sharedochiai.cpp b/sharedochiai.cpp index 9a64a2c..a9677e5 100644 --- a/sharedochiai.cpp +++ b/sharedochiai.cpp @@ -11,7 +11,7 @@ /***********************************************************************/ -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; @@ -40,11 +40,11 @@ EstOutput SharedOchiai::getValues(SharedRAbundVector* shared1, SharedRAbundVecto 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); } } diff --git a/sharedochiai.h b/sharedochiai.h index 27de375..26c6c58 100644 --- a/sharedochiai.h +++ b/sharedochiai.h @@ -1,5 +1,5 @@ -#ifndef SHAREDOCHIAI_H -#define SHAREDOCHIAI_H +#ifndef OCHIAI_H +#define OCHIAI_H /* * sharedochiai.h * Mothur @@ -13,10 +13,10 @@ /***********************************************************************/ -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: diff --git a/sharedsorabund.cpp b/sharedsorabund.cpp index e895381..36478de 100644 --- a/sharedsorabund.cpp +++ b/sharedsorabund.cpp @@ -11,7 +11,7 @@ /***********************************************************************/ -EstOutput SharedSorAbund::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) { +EstOutput SorAbund::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) { try { EstOutput UVest; UVest.resize(2,0); @@ -27,11 +27,11 @@ EstOutput SharedSorAbund::getValues(SharedRAbundVector* shared1, SharedRAbundVec 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); } } diff --git a/sharedsorabund.h b/sharedsorabund.h index e1ca45a..452471a 100644 --- a/sharedsorabund.h +++ b/sharedsorabund.h @@ -1,5 +1,5 @@ -#ifndef SHAREDSORABUND_H -#define SHAREDSORABUND_H +#ifndef SORABUND_H +#define SORABUND_H /* * sharedsorabund.h * Dotur @@ -17,10 +17,10 @@ It is a child of the calculator class. */ /***********************************************************************/ -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: diff --git a/sharedsorclass.cpp b/sharedsorclass.cpp index 81d8d86..4fafe3e 100644 --- a/sharedsorclass.cpp +++ b/sharedsorclass.cpp @@ -11,7 +11,7 @@ /***********************************************************************/ -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; @@ -41,11 +41,11 @@ EstOutput SharedSorClass::getValues(SharedRAbundVector* shared1, SharedRAbundVec 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); } } diff --git a/sharedsorclass.h b/sharedsorclass.h index 7a5e282..f867b22 100644 --- a/sharedsorclass.h +++ b/sharedsorclass.h @@ -1,5 +1,5 @@ -#ifndef SHAREDSORCLASS_H -#define SHAREDSORCLASS_H +#ifndef SORCLASS_H +#define SORCLASS_H /* * sharedsorclass.h * Dotur @@ -17,10 +17,10 @@ It is a child of the calculator class. */ /***********************************************************************/ -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: diff --git a/sharedsorest.cpp b/sharedsorest.cpp index 4f44b91..68048b1 100644 --- a/sharedsorest.cpp +++ b/sharedsorest.cpp @@ -13,7 +13,7 @@ /***********************************************************************/ -EstOutput SharedSorEst::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) { +EstOutput SorEst::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) { try { EstOutput S1, S2, S12; S12.resize(1,0); @@ -45,11 +45,11 @@ EstOutput SharedSorEst::getValues(SharedRAbundVector* shared1, SharedRAbundVecto 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); } } diff --git a/sharedsorest.h b/sharedsorest.h index 1589ccc..58de552 100644 --- a/sharedsorest.h +++ b/sharedsorest.h @@ -1,5 +1,5 @@ -#ifndef SHAREDSOREST_H -#define SHAREDSOREST_H +#ifndef SOREST_H +#define SOREST_H /* * sharedsorest.h * Dotur @@ -17,10 +17,10 @@ It is a child of the calculator class. */ /***********************************************************************/ -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: diff --git a/sharedthetan.cpp b/sharedthetan.cpp index 3c97d89..853bf81 100644 --- a/sharedthetan.cpp +++ b/sharedthetan.cpp @@ -10,7 +10,7 @@ #include "sharedthetan.h" /***********************************************************************/ -EstOutput SharedThetaN::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) { +EstOutput ThetaN::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) { try { data.resize(1,0); @@ -51,11 +51,11 @@ EstOutput SharedThetaN::getValues(SharedRAbundVector* shared1, SharedRAbundVecto 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); } } diff --git a/sharedthetan.h b/sharedthetan.h index 02b9f87..459868e 100644 --- a/sharedthetan.h +++ b/sharedthetan.h @@ -1,5 +1,5 @@ -#ifndef SHAREDTHETAN_H -#define SHAREDTHETAN_H +#ifndef THETAN_H +#define THETAN_H /* * sharedthetan.h * Dotur @@ -17,10 +17,10 @@ It is a child of the calculator class. */ /***********************************************************************/ -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: diff --git a/sharedthetayc.cpp b/sharedthetayc.cpp index ad2e1c5..1357cb6 100644 --- a/sharedthetayc.cpp +++ b/sharedthetayc.cpp @@ -10,7 +10,7 @@ #include "sharedthetayc.h" /***********************************************************************/ -EstOutput SharedThetaYC::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) { +EstOutput ThetaYC::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) { try { data.resize(1,0); @@ -52,11 +52,11 @@ EstOutput SharedThetaYC::getValues(SharedRAbundVector* shared1, SharedRAbundVect 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); } } diff --git a/sharedthetayc.h b/sharedthetayc.h index c3c0000..b17d3c4 100644 --- a/sharedthetayc.h +++ b/sharedthetayc.h @@ -1,5 +1,5 @@ -#ifndef SHAREDTHETAYC_H -#define SHAREDTHETAYC_H +#ifndef THETAYC_H +#define THETAYC_H /* * sharedthetayc.h * Dotur @@ -17,10 +17,10 @@ It is a child of the calculator class. */ /***********************************************************************/ -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: diff --git a/summarysharedcommand.cpp b/summarysharedcommand.cpp index bebdf26..05a5f7e 100644 --- a/summarysharedcommand.cpp +++ b/summarysharedcommand.cpp @@ -51,43 +51,43 @@ SummarySharedCommand::SummarySharedCommand(){ 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()); } } diff --git a/treegroupscommand.cpp b/treegroupscommand.cpp index bdd664a..a6e1918 100644 --- a/treegroupscommand.cpp +++ b/treegroupscommand.cpp @@ -31,24 +31,24 @@ TreeGroupCommand::TreeGroupCommand(){ int i; for (i=0; iEstimators.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()); } } } diff --git a/validcalculator.cpp b/validcalculator.cpp index 90257c7..4c05e4a 100644 --- a/validcalculator.cpp +++ b/validcalculator.cpp @@ -175,7 +175,7 @@ void ValidCalculators::initialSingle() { single["logsd"] = "logsd"; single["qstat"] = "qstat"; single["bstick"] = "bstick"; - single["nseqs"] = "nseqs"; + single["nseqs"] = "nseqs"; single["default"] = "default"; } catch(exception& e) { @@ -194,24 +194,24 @@ void ValidCalculators::initialShared() { 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) { @@ -284,24 +284,24 @@ void ValidCalculators::initialSharedSummary() { 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) { @@ -339,9 +339,9 @@ void ValidCalculators::initialVennSingle() { 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"; @@ -374,15 +374,15 @@ void ValidCalculators::initialVennShared() { /********************************************************************/ 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";