X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=validcalculator.cpp;h=b9075414a456c8abc5aa14fbd382dc5c48a0dcb3;hb=a89c6295ae9a35fcaaab7fa50dcb68360dd543b0;hp=a22ece24c3c83943d90971f51026ddeb6ddd3c73;hpb=8f7f4fc08b8c70d9ef0f79607813dba4e926e102;p=mothur.git diff --git a/validcalculator.cpp b/validcalculator.cpp index a22ece2..b907541 100644 --- a/validcalculator.cpp +++ b/validcalculator.cpp @@ -76,6 +76,9 @@ #include "mempearson.h" #include "sharedsobs.h" #include "sharednseqs.h" +#include "sharedjsd.h" +#include "sharedrjsd.h" +#include "shannonrange.h" /********************************************************************/ @@ -137,6 +140,7 @@ void ValidCalculators::printCitations(vector Estimators) { }else if (Estimators[i] == "jack") { Calculator* temp = new Jackknife(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp; }else if (Estimators[i] == "shannon") { Calculator* temp = new Shannon(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp; }else if (Estimators[i] == "shannoneven") { Calculator* temp = new ShannonEven(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp; + }else if (Estimators[i] == "shannonrange") { Calculator* temp = new RangeShannon(0); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp; }else if (Estimators[i] == "npshannon") { Calculator* temp = new NPShannon(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp; }else if (Estimators[i] == "heip") { Calculator* temp = new Heip(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp; @@ -177,7 +181,7 @@ void ValidCalculators::printCitations(vector Estimators) { }else if (Estimators[i] == "ochiai") { Calculator* temp = new Ochiai(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp; }else if (Estimators[i] == "anderberg") { Calculator* temp = new Anderberg(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp; - }else if (Estimators[i] == "skulczynski") { Calculator* temp = new Kulczynski(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp; + }else if (Estimators[i] == "kulczynski") { Calculator* temp = new Kulczynski(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp; }else if (Estimators[i] == "kulczynskicody") { Calculator* temp = new KulczynskiCody(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp; }else if (Estimators[i] == "lennon") { Calculator* temp = new Lennon(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp; }else if (Estimators[i] == "morisitahorn") { Calculator* temp = new MorHorn(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp; @@ -206,6 +210,8 @@ void ValidCalculators::printCitations(vector Estimators) { }else if (Estimators[i] == "mempearson") { Calculator* temp = new MemPearson(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp; }else if (Estimators[i] == "sharedobserved") { Calculator* temp = new SharedSobs(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp; }else if (Estimators[i] == "kulczynski") { Calculator* temp = new Kulczynski(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp; + }else if (Estimators[i] == "jsd") { Calculator* temp = new JSD(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp; + }else if (Estimators[i] == "rjsd") { Calculator* temp = new RJSD(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp; }else { m->mothurOut("[ERROR]: Missing else if for " + Estimators[i] + " in printCitations."); m->mothurOutEndLine(); } }else { m->mothurOut(Estimators[i] + " is not a valid calculator, no citation will be given."); m->mothurOutEndLine(); } } @@ -388,6 +394,7 @@ void ValidCalculators::initialSingle() { single["shannon"] = "shannon"; single["npshannon"] = "npshannon"; single["shannoneven"] = "shannoneven"; + single["shannonrange"] = "shannonrange"; single["smithwilson"] = "smithwilson"; single["heip"] = "heip"; single["simpson"] = "simpson"; @@ -456,6 +463,8 @@ void ValidCalculators::initialShared() { shared["memchord"] = "memchord"; shared["memeuclidean"] = "memeuclidean"; shared["mempearson"] = "mempearson"; + shared["jsd"] = "jsd"; + shared["rjsd"] = "rjsd"; shared["default"] = "default"; } catch(exception& e) { @@ -476,6 +485,7 @@ void ValidCalculators::initialRarefaction() { rarefaction["heip"] = "heip"; rarefaction["npshannon"] = "npshannon"; rarefaction["shannoneven"] = "shannoneven"; + rarefaction["shannonrange"] = "shannonrange"; rarefaction["simpson"] = "simpson"; rarefaction["invsimpson"] = "invsimpson"; rarefaction["simpsoneven"] = "simpsoneven"; @@ -504,6 +514,7 @@ void ValidCalculators::initialSummary() { summary["smithwilson"] = "smithwilson"; summary["invsimpson"] = "invsimpson"; summary["npshannon"] = "npshannon"; + summary["shannonrange"] = "shannonrange"; summary["simpson"] = "simpson"; summary["simpsoneven"] = "simpsoneven"; summary["bergerparker"] = "bergerparker"; @@ -569,6 +580,8 @@ void ValidCalculators::initialSharedSummary() { sharedsummary["memchord"] = "memchord"; sharedsummary["memeuclidean"] = "memeuclidean"; sharedsummary["mempearson"] = "mempearson"; + sharedsummary["jsd"] = "jsd"; + sharedsummary["rjsd"] = "rjsd"; sharedsummary["default"] = "default"; } catch(exception& e) { @@ -662,6 +675,8 @@ void ValidCalculators::initialTreeGroups() { treegroup["gower"] = "gower"; treegroup["memchi2"] = "memchi2"; treegroup["memchord"] = "memchord"; + treegroup["jsd"] = "jsd"; + treegroup["rjsd"] = "rjsd"; treegroup["memeuclidean"] = "memeuclidean"; treegroup["mempearson"] = "mempearson"; @@ -726,13 +741,15 @@ void ValidCalculators::initialMatrix() { matrix["structchi2"] = "structchi2"; matrix["soergel"] = "soergel"; matrix["spearman"] = "spearman"; - matrix["speciesprofile"] = "speciesprofile"; + matrix["speciesprofile"] = "speciesprofile"; matrix["hamming"] = "hamming"; matrix["gower"] = "gower"; matrix["memchi2"] = "memchi2"; matrix["memchord"] = "memchord"; matrix["memeuclidean"] = "memeuclidean"; - matrix["mempearson"] = "mempearson"; + matrix["mempearson"] = "mempearson"; + matrix["rjsd"] = "rjsd"; + matrix["jsd"] = "jsd"; } catch(exception& e) {