X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=mgclustercommand.cpp;fp=mgclustercommand.cpp;h=6ef968c2248de78e304291f3c781a2baa44ad8ea;hb=ccae9eef0b44f2d63fdf4a707d0d40243aa1b990;hp=cffb80f9e8f2963d4983c6637d8eef2b33566de4;hpb=078d7227da8dda9ae8620822fa32d51ec2706fc3;p=mothur.git diff --git a/mgclustercommand.cpp b/mgclustercommand.cpp index cffb80f..6ef968c 100644 --- a/mgclustercommand.cpp +++ b/mgclustercommand.cpp @@ -172,7 +172,7 @@ MGClusterCommand::MGClusterCommand(string option) { else if (countfile == "not found") { countfile = ""; } else { m->setCountTableFile(countfile); } - if (countfile != "" && namefile != "") { m->mothurOut("Cannot have both a name file and count file. Please use one or the other."); m->mothurOutEndLine(); abort = true; } + if (countfile != "" && namefile != "") { m->mothurOut("[ERROR]: Cannot have both a name file and count file. Please use one or the other."); m->mothurOutEndLine(); abort = true; } if ((blastfile == "")) { m->mothurOut("When executing a mgcluster command you must provide a blastfile."); m->mothurOutEndLine(); abort = true; } @@ -249,8 +249,8 @@ int MGClusterCommand::execute(){ //map nameMapCounts = m->readNames(namefile); ct = new CountTable(); ct->readTable(countfile); - createRabund(ct, list); - rabund = &rav; + rabund = new RAbundVector(); + createRabund(ct, list, rabund); }else { rabund = new RAbundVector(list->getRAbundVector()); } @@ -724,7 +724,7 @@ void MGClusterCommand::sortHclusterFiles(string unsortedDist, string unsortedOve //********************************************************************************************************************** -void MGClusterCommand::createRabund(CountTable* ct, ListVector* list){ +void MGClusterCommand::createRabund(CountTable*& ct, ListVector*& list, RAbundVector*& rabund){ try { //vector names = ct.getNamesOfSeqs(); @@ -739,7 +739,7 @@ void MGClusterCommand::createRabund(CountTable* ct, ListVector* list){ for (int j = 0; j < binNames.size(); j++) { total += ct->getNumSeqs(binNames[j]); } - rav.push_back(total); + rabund->push_back(total); }