X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=treegroupscommand.cpp;h=902b9a253b0aa7e5515b74adf464b7fe17a65e2c;hb=cd7040a22ae19c86a13c2c10ed90a64b77a0c482;hp=5d7df3440439c469f3311073d2237b87272e79e6;hpb=1d898dc6edaf9e9f287fab53bf1f21fb29757a17;p=mothur.git diff --git a/treegroupscommand.cpp b/treegroupscommand.cpp index 5d7df34..902b9a2 100644 --- a/treegroupscommand.cpp +++ b/treegroupscommand.cpp @@ -125,6 +125,7 @@ TreeGroupCommand::TreeGroupCommand(string option) { //allow user to run help if(option == "help") { help(); abort = true; calledHelp = true; } + else if(option == "citation") { citation(); abort = true; calledHelp = true;} else { vector myArray = setParameters(); @@ -178,21 +179,22 @@ TreeGroupCommand::TreeGroupCommand(string option) { phylipfile = validParameter.validFile(parameters, "phylip", true); if (phylipfile == "not open") { phylipfile = ""; abort = true; } else if (phylipfile == "not found") { phylipfile = ""; } - else { inputfile = phylipfile; format = "phylip"; } + else { inputfile = phylipfile; format = "phylip"; m->setPhylipFile(phylipfile); } columnfile = validParameter.validFile(parameters, "column", true); if (columnfile == "not open") { columnfile = ""; abort = true; } else if (columnfile == "not found") { columnfile = ""; } - else { inputfile = columnfile; format = "column"; } + else { inputfile = columnfile; format = "column"; m->setColumnFile(columnfile); } sharedfile = validParameter.validFile(parameters, "shared", true); if (sharedfile == "not open") { sharedfile = ""; abort = true; } else if (sharedfile == "not found") { sharedfile = ""; } - else { inputfile = sharedfile; format = "sharedfile"; } + else { inputfile = sharedfile; format = "sharedfile"; m->setSharedFile(sharedfile); } namefile = validParameter.validFile(parameters, "name", true); if (namefile == "not open") { abort = true; } else if (namefile == "not found") { namefile = ""; } + else { m->setNameFile(namefile); } if ((phylipfile == "") && (columnfile == "") && (sharedfile == "")) { //is there are current file available for either of these? @@ -247,6 +249,11 @@ TreeGroupCommand::TreeGroupCommand(string option) { if (calc == "default") { calc = "jclass-thetayc"; } } m->splitAtDash(calc, Estimators); + if (m->inUsersGroups("citation", Estimators)) { + ValidCalculators validCalc; validCalc.printCitations(Estimators); + //remove citation from list of calcs + for (int i = 0; i < Estimators.size(); i++) { if (Estimators[i] == "citation") { Estimators.erase(Estimators.begin()+i); break; } } + } string temp; temp = validParameter.validFile(parameters, "precision", false); if (temp == "not found") { temp = "100"; } @@ -752,8 +759,8 @@ int TreeGroupCommand::process(vector thisLookup) { if (m->control_pressed) { return 1; } //save values in similarity matrix - simMatrix[k][l] = data[0]; - simMatrix[l][k] = data[0]; + simMatrix[k][l] = -(data[0]-1.0); + simMatrix[l][k] = -(data[0]-1.0); } } }