X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=mgclustercommand.cpp;h=e3287f7f9bb19a4079c28e92fe57cf99e06216d5;hp=e76dd4860b03826db116323af7e42528a591c526;hb=b8ff3bca0560a53832723f4621fcddef7ec4e499;hpb=ad4f75fd7c938090d3b1ce4cfefcc21edf1869eb diff --git a/mgclustercommand.cpp b/mgclustercommand.cpp index e76dd48..e3287f7 100644 --- a/mgclustercommand.cpp +++ b/mgclustercommand.cpp @@ -228,7 +228,13 @@ int MGClusterCommand::execute(){ if (namefile != "") { nameMap = new NameAssignment(namefile); nameMap->readMap(); - }else{ nameMap= new NameAssignment(); } + }else if (countfile != "") { + ct = new CountTable(); + ct->readTable(countfile, false); + nameMap= new NameAssignment(); + vector tempNames = ct->getNamesOfSeqs(); + for (int i = 0; i < tempNames.size(); i++) { nameMap->push_back(tempNames[i]); } + }else{ nameMap= new NameAssignment(); } string fileroot = outputDir + m->getRootName(m->getSimpleName(blastfile)); string tag = ""; @@ -245,9 +251,6 @@ int MGClusterCommand::execute(){ RAbundVector* rabund = NULL; if(countfile != "") { - //map nameMapCounts = m->readNames(namefile); - ct = new CountTable(); - ct->readTable(countfile, false); rabund = new RAbundVector(); createRabund(ct, list, rabund); }else {