X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;ds=sidebyside;f=pcoacommand.cpp;h=4be5ffb8c5b63c4202666aecd57ec58c2be05374;hb=662c0b60d65f79f672ab199300b7ee4975233465;hp=6777b5a56cb1182654c66bf6d065f9f973a10525;hpb=d04f948b1a2a1a2984fc4a45d04403b8c121c5bc;p=mothur.git diff --git a/pcoacommand.cpp b/pcoacommand.cpp index 6777b5a..4be5ffb 100644 --- a/pcoacommand.cpp +++ b/pcoacommand.cpp @@ -26,8 +26,7 @@ vector PCOACommand::getValidParameters(){ //********************************************************************************************************************** PCOACommand::PCOACommand(){ try { - abort = true; - //initialize outputTypes + abort = true; calledHelp = true; vector tempOutNames; outputTypes["pcoa"] = tempOutNames; outputTypes["loadings"] = tempOutNames; @@ -64,10 +63,10 @@ vector PCOACommand::getRequiredFiles(){ PCOACommand::PCOACommand(string option) { try { - abort = false; + abort = false; calledHelp = false; //allow user to run help - if(option == "help") { help(); abort = true; } + if(option == "help") { help(); abort = true; calledHelp = true; } else { //valid paramters for this command @@ -149,7 +148,7 @@ PCOACommand::~PCOACommand(){} int PCOACommand::execute(){ try { - if (abort == true) { return 0; } + if (abort == true) { if (calledHelp) { return 0; } return 2; } cout.setf(ios::fixed, ios::floatfield); cout.setf(ios::showpoint); @@ -198,7 +197,7 @@ int PCOACommand::execute(){ double corr = linearCalc.calcPearson(EuclidDists, D); //G is the pcoa file, D is the users distance matrix - m->mothurOut("Pearson's coefficient using " + toString(i) + " axis: " + toString(corr)); m->mothurOutEndLine(); + m->mothurOut("Rsq " + toString(i) + " axis: " + toString(corr * corr)); m->mothurOutEndLine(); if (m->control_pressed) { for (int i = 0; i < outputNames.size(); i++) { remove(outputNames[i].c_str()); } return 0; } } @@ -277,11 +276,11 @@ void PCOACommand::output(string fnameRoot, vector name_list, vector