X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=treegroupscommand.cpp;h=e50fbaad53f0438a44bc25bf5b7c55fbf9146b83;hb=fd00cd216d3a38ccea22eae258e601df64218b05;hp=bdd664a55d360fe753318900456828b69b8daa4f;hpb=c5c7502f435e1413c19e373dab1dfebcaa67588d;p=mothur.git diff --git a/treegroupscommand.cpp b/treegroupscommand.cpp index bdd664a..e50fbaa 100644 --- a/treegroupscommand.cpp +++ b/treegroupscommand.cpp @@ -17,6 +17,7 @@ #include "sharedthetayc.h" #include "sharedthetan.h" #include "sharedmorisitahorn.h" +#include "sharedbraycurtis.h" //********************************************************************************************************************** @@ -31,24 +32,26 @@ 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] == "sorabund") { + 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()); + }else if (globaldata->Estimators[i] == "braycurtis") { + treeCalculators.push_back(new BrayCurtis()); } } } @@ -85,14 +88,14 @@ int TreeGroupCommand::execute(){ if (treeCalculators.size() == 0) { return 0; } if (format == "sharedfile") { - read = new ReadPhilFile(globaldata->inputFileName); + read = new ReadOTUFile(globaldata->inputFileName); read->read(&*globaldata); input = globaldata->ginput; order = input->getSharedOrderVector(); }else { //you are using a list and a groupfile - read = new ReadPhilFile(globaldata->inputFileName); + read = new ReadOTUFile(globaldata->inputFileName); read->read(&*globaldata); input = globaldata->ginput; @@ -141,9 +144,9 @@ int TreeGroupCommand::execute(){ for (int g = 0; g < numGroups; g++) { index[g] = g; } //create a new filename - outputFile = getRootName(globaldata->inputFileName) + treeCalculators[i]->getName() + "." + order->getLabel() + groupNames + ".tre"; + outputFile = getRootName(globaldata->inputFileName) + treeCalculators[i]->getName() + "." + order->getLabel() + ".tre"; - for (int k = 0; k < lookup.size(); k++) { // pass cdd each set of groups to commpare + for (int k = 0; k < lookup.size(); k++) { for (int l = k; l < lookup.size(); l++) { if (k != l) { //we dont need to similiarity of a groups to itself //get estimated similarity between 2 groups