X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=mgclustercommand.cpp;h=e5681efb220d1635382ea6b077a36ea4e0f50226;hb=8772a51e7ab31b1c49dada6d38baf1474444943c;hp=c4cdb50a303e6e814bf7c6e10ca5fcb76935b597;hpb=59af31754310365c71de1f205dd58af794f6c5ae;p=mothur.git diff --git a/mgclustercommand.cpp b/mgclustercommand.cpp index c4cdb50..e5681ef 100644 --- a/mgclustercommand.cpp +++ b/mgclustercommand.cpp @@ -235,12 +235,12 @@ int MGClusterCommand::execute(){ RAbundVector* rabund = NULL; if(large) { map nameMapCounts = m->readNames(namefile); - RAbundVector* rabund = newFunctionToCreateRabund(list, nameMapCounts); + RAbundVector* rabund = createRabund(list, nameMapCounts); }else { RAbundVector* rabund = new RAbundVector(list->getRAbundVector()); } - + //list = new ListVector(nameMap->getListVector()); //RAbundVector* rabund = new RAbundVector(list->getRAbundVector()); @@ -709,7 +709,19 @@ void MGClusterCommand::sortHclusterFiles(string unsortedDist, string unsortedOve //********************************************************************************************************************** +RAbundVector MGClusterCommand::createRabund(ListVector list, map nameMapCounts){ + try { + RAbundVector rav; + for(int i = 0; i < list->getNumBins(); i++) { rav.push_back(nameMapCounts[i]); } + return rav; + } + catch(exception& e) { + m->errorOut(e, "MGClusterCommand", "createRabund"); + exit(1); + } + +} - +//**********************************************************************************************************************