X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=kruskalwalliscommand.cpp;h=dc297e11d3ed61202a8e4bcb001686ea9475e52c;hp=805d21e51d5331576185f6d28128af8dad7cbae3;hb=cf9987b67aa49777a4c91c2d21f96e58bf17aa82;hpb=03fae12080951ea1d889da5187386abc236cc334 diff --git a/kruskalwalliscommand.cpp b/kruskalwalliscommand.cpp index 805d21e..dc297e1 100644 --- a/kruskalwalliscommand.cpp +++ b/kruskalwalliscommand.cpp @@ -15,7 +15,6 @@ vector KruskalWallisCommand::setParameters(){ CommandParameter pshared("shared", "InputTypes", "", "", "none", "none", "none","summary",false,true,true); parameters.push_back(pshared); CommandParameter pclass("class", "String", "", "", "", "", "","",false,false); parameters.push_back(pclass); CommandParameter plabel("label", "String", "", "", "", "", "","",false,false); parameters.push_back(plabel); - CommandParameter pclasses("classes", "String", "", "", "", "", "","",false,false); parameters.push_back(pclasses); //every command must have inputdir and outputdir. This allows mothur users to redirect input and output files. CommandParameter pinputdir("inputdir", "String", "", "", "", "", "","",false,false); parameters.push_back(pinputdir); CommandParameter poutputdir("outputdir", "String", "", "", "", "", "","",false,false); parameters.push_back(poutputdir); @@ -34,9 +33,8 @@ string KruskalWallisCommand::getHelpString(){ try { string helpString = ""; helpString += "The kruskal.wallis command allows you to ....\n"; - helpString += "The kruskal.wallis command parameters are: shared, design, class, label and classes.\n"; + helpString += "The kruskal.wallis command parameters are: shared, design, class, label and classes.\n"; helpString += "The class parameter is used to indicate the which category you would like used for the Kruskal Wallis analysis. If none is provided first category is used.\n"; - helpString += "The classes parameter is used to indicate the classes you would like to use. Clases should be inputted in the following format: classes=label-label. For example to include groups from treatment with value early or late and age= young or old. class=treatment-age.\n"; helpString += "The label parameter is used to indicate which distances in the shared file you would like to use. labels are separated by dashes.\n"; helpString += "The kruskal.wallis command should be in the following format: kruskal.wallis(shared=final.an.shared, design=final.design, class=treatment).\n"; return helpString; @@ -159,9 +157,6 @@ KruskalWallisCommand::KruskalWallisCommand(string option) { mclass = validParameter.validFile(parameters, "class", false); if (mclass == "not found") { mclass = ""; } - classes = validParameter.validFile(parameters, "classes", false); - if (classes == "not found") { classes = ""; } - } } @@ -178,13 +173,6 @@ int KruskalWallisCommand::execute(){ if (abort == true) { if (calledHelp) { return 0; } return 2; } DesignMap designMap(designfile); - //if user set classes set groups=those classes - if (classes != "") { - map > thisClasses = m->parseClasses(classes); - vector groups = designMap.getNamesUnique(thisClasses); - if (groups.size() != 0) { m->setGroups(groups); } - else { m->mothurOut("[ERROR]: no groups meet your classes requirement, quitting.\n"); return 0; } - } //if user did not select class use first column if (mclass == "") { mclass = designMap.getDefaultClass(); m->mothurOut("\nYou did not provide a class, using " + mclass +".\n\n"); } @@ -319,7 +307,7 @@ int KruskalWallisCommand::process(vector& lookup, DesignMap double H = linear.calcKruskalWallis(values, pValue); //output H and signifigance - out << m->currentBinLabels[i] << '\t' << H << '\t' << pValue << endl; + out << m->currentSharedBinLabels[i] << '\t' << H << '\t' << pValue << endl; } out.close();