X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=matrixoutputcommand.cpp;h=8a7656cee9cda0086fd2aaedd1afd5fb27896952;hb=ffa535cf04326227080b02594616971a2c3a5195;hp=310e32bf23e048c73ae37579ac2e8e2d1cb8b0ff;hpb=4e3080b15a3d0c02f7ef2fd779ead433ffdece31;p=mothur.git diff --git a/matrixoutputcommand.cpp b/matrixoutputcommand.cpp index 310e32b..8a7656c 100644 --- a/matrixoutputcommand.cpp +++ b/matrixoutputcommand.cpp @@ -17,7 +17,7 @@ vector MatrixOutputCommand::setParameters(){ CommandParameter plabel("label", "String", "", "", "", "", "","",false,false); parameters.push_back(plabel); CommandParameter psubsample("subsample", "String", "", "", "", "", "","",false,false); parameters.push_back(psubsample); CommandParameter pgroups("groups", "String", "", "", "", "", "","",false,false); parameters.push_back(pgroups); - 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", "jclass-thetayc", "", "", "","",true,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", "jclass-thetayc", "", "", "","",true,false,true); parameters.push_back(pcalc); CommandParameter poutput("output", "Multiple", "lt-square-column", "lt", "", "", "","",false,false); parameters.push_back(poutput); CommandParameter pmode("mode", "Multiple", "average-median", "average", "", "", "","",false,false); parameters.push_back(pmode); CommandParameter pprocessors("processors", "Number", "", "1", "", "", "","",false,false,true); parameters.push_back(pprocessors); @@ -281,6 +281,9 @@ MatrixOutputCommand::MatrixOutputCommand(string option) { matrixCalculators.push_back(new MemEuclidean()); }else if (Estimators[i] == "mempearson") { matrixCalculators.push_back(new MemPearson()); + }else if (Estimators[i] == "jsd") { + matrixCalculators.push_back(new JSD()); + } } } @@ -652,7 +655,7 @@ int MatrixOutputCommand::process(vector thisLookup){ } if (subsample && (thisIter != 0)) { - if((thisIter) % 100 == 0){ m->mothurOut(toString(thisIter)); m->mothurOutEndLine(); } + if((thisIter) % 100 == 0){ m->mothurOutJustToScreen(toString(thisIter)+"\n"); } calcDistsTotals.push_back(calcDists); for (int i = 0; i < calcDists.size(); i++) { for (int j = 0; j < calcDists[i].size(); j++) { @@ -791,7 +794,7 @@ int MatrixOutputCommand::driver(vector thisLookup, int star vector tempdata = matrixCalculators[i]->getValues(subset); //saves the calculator outputs if (m->control_pressed) { return 1; } - + seqDist temp(l, k, tempdata[0]); calcDists[i].push_back(temp); }