X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;ds=sidebyside;f=pcacommand.cpp;h=ee0a5462de87049f6b026546492203be630ea8d7;hb=15cde0905641f8adddc1cc704f8c064f760e7461;hp=51e3c319f377b893224e1e2f2d7093b3665c0d8a;hpb=7588ff51d365aad66f455694afb90b6fd3e6639a;p=mothur.git diff --git a/pcacommand.cpp b/pcacommand.cpp index 51e3c31..ee0a546 100644 --- a/pcacommand.cpp +++ b/pcacommand.cpp @@ -10,6 +10,55 @@ #include "pcacommand.h" +//********************************************************************************************************************** +vector PCACommand::getValidParameters(){ + try { + string Array[] = {"phylip", "outputdir","inputdir"}; + vector myArray (Array, Array+(sizeof(Array)/sizeof(string))); + return myArray; + } + catch(exception& e) { + m->errorOut(e, "PCACommand", "getValidParameters"); + exit(1); + } +} +//********************************************************************************************************************** +PCACommand::PCACommand(){ + try { + abort = true; + //initialize outputTypes + vector tempOutNames; + outputTypes["pcoa"] = tempOutNames; + outputTypes["loadings"] = tempOutNames; + } + catch(exception& e) { + m->errorOut(e, "PCACommand", "PCACommand"); + exit(1); + } +} +//********************************************************************************************************************** +vector PCACommand::getRequiredParameters(){ + try { + string Array[] = {"phylip"}; + vector myArray (Array, Array+(sizeof(Array)/sizeof(string))); + return myArray; + } + catch(exception& e) { + m->errorOut(e, "PCACommand", "getRequiredParameters"); + exit(1); + } +} +//********************************************************************************************************************** +vector PCACommand::getRequiredFiles(){ + try { + vector myArray; + return myArray; + } + catch(exception& e) { + m->errorOut(e, "PCACommand", "getRequiredFiles"); + exit(1); + } +} //********************************************************************************************************************** PCACommand::PCACommand(string option) { @@ -47,7 +96,12 @@ PCACommand::PCACommand(string option) { if (path == "") { parameters["phylip"] = inputDir + it->second; } } } - + + //initialize outputTypes + vector tempOutNames; + outputTypes["pcoa"] = tempOutNames; + outputTypes["loadings"] = tempOutNames; + //required parameters phylipfile = validParameter.validFile(parameters, "phylip", true); if (phylipfile == "not open") { abort = true; } @@ -516,11 +570,13 @@ void PCACommand::output(string fnameRoot, vector name_list, vector