X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=getmetacommunitycommand.cpp;h=2b944153a92e5c919a0e2269916f0ffbbc9d2395;hb=6ce64c0c32f0aa22eaf70953bd8264130e20e18f;hp=b3160749e9031072ceafdea29b92a33a2909cff6;hpb=a2cde58c1e72199498a2142983ef040dce36da10;p=mothur.git diff --git a/getmetacommunitycommand.cpp b/getmetacommunitycommand.cpp index b316074..2b94415 100644 --- a/getmetacommunitycommand.cpp +++ b/getmetacommunitycommand.cpp @@ -18,7 +18,7 @@ vector GetMetaCommunityCommand::setParameters(){ CommandParameter pshared("shared", "InputTypes", "", "", "none", "none", "none","outputType",false,true); parameters.push_back(pshared); CommandParameter pgroups("groups", "String", "", "", "", "", "","",false,false); parameters.push_back(pgroups); CommandParameter plabel("label", "String", "", "", "", "", "","",false,false); parameters.push_back(plabel); - CommandParameter pcalc("calc", "Multiple", "sharedsobs-sharedchao-sharedace-jabund-sorabund-jclass-sorclass-jest-sorest-thetayc-thetan-kstest-sharednseqs-ochiai-anderberg-kulczynski-kulczynskicody-lennon-morisitahorn-braycurtis-whittaker-odum-canberra-structeuclidean-structchord-hellinger-manhattan-structpearson-soergel-spearman-structkulczynski-speciesprofile-hamming-structchi2-gower-memchi2-memchord-memeuclidean-mempearson-jsd", "jsd", "", "", "","",false,false,true); parameters.push_back(pcalc); + CommandParameter pcalc("calc", "Multiple", "sharedsobs-sharedchao-sharedace-jabund-sorabund-jclass-sorclass-jest-sorest-thetayc-thetan-kstest-sharednseqs-ochiai-anderberg-kulczynski-kulczynskicody-lennon-morisitahorn-braycurtis-whittaker-odum-canberra-structeuclidean-structchord-hellinger-manhattan-structpearson-soergel-spearman-structkulczynski-speciesprofile-hamming-structchi2-gower-memchi2-memchord-memeuclidean-mempearson-jsd-rjsd", "rjsd", "", "", "","",false,false,true); parameters.push_back(pcalc); CommandParameter psubsample("subsample", "String", "", "", "", "", "","",false,false); parameters.push_back(psubsample); CommandParameter piters("iters", "Number", "", "1000", "", "", "","",false,false); parameters.push_back(piters); CommandParameter pminpartitions("minpartitions", "Number", "", "5", "", "", "","",false,false,true); parameters.push_back(pminpartitions); @@ -190,9 +190,9 @@ GetMetaCommunityCommand::GetMetaCommunityCommand(string option) { else { m->mothurOut("[ERROR]: " + method + " is not a valid method. Valid algorithms are dmm, kmeans and pam."); m->mothurOutEndLine(); abort = true; } calc = validParameter.validFile(parameters, "calc", false); - if (calc == "not found") { calc = "jsd"; } + if (calc == "not found") { calc = "rjsd"; } else { - if (calc == "default") { calc = "jsd"; } + if (calc == "default") { calc = "rjsd"; } } m->splitAtDash(calc, Estimators); if (m->inUsersGroups("citation", Estimators)) { @@ -611,6 +611,12 @@ int GetMetaCommunityCommand::processDriver(vector& thislook finder = new qFinderDMM(sharedMatrix, numPartitions); } + string relabund = relabunds[i]; + string matrixName = matrix[i]; + outputNames.push_back(matrixName); outputTypes["matrix"].push_back(matrixName); + + finder->printZMatrix(matrixName, thisGroups); + double chi; vector silhouettes; if (method == "dmm") { double laplace = finder->getLaplace(); @@ -627,11 +633,6 @@ int GetMetaCommunityCommand::processDriver(vector& thislook minSilhouettes = silhouettes; } } - string relabund = relabunds[i]; - string matrixName = matrix[i]; - outputNames.push_back(matrixName); outputTypes["matrix"].push_back(matrixName); - - finder->printZMatrix(matrixName, thisGroups); if (method == "dmm") { finder->printFitData(cout, minLaplace); @@ -961,6 +962,8 @@ vector > GetMetaCommunityCommand::generateDistanceMatrix(vectormothurOut("[ERROR]: " + Estimators[i] + " is not a valid calculator, please correct.\n"); m->control_pressed = true; return results; }