]> git.donarmstrong.com Git - mothur.git/blobdiff - mgclustercommand.cpp
edited createRabund function
[mothur.git] / mgclustercommand.cpp
index a0f33d6f8bba8c2976b0a969924c4082c98ca67a..e5681efb220d1635382ea6b077a36ea4e0f50226 100644 (file)
@@ -710,9 +710,16 @@ void MGClusterCommand::sortHclusterFiles(string unsortedDist, string unsortedOve
 //**********************************************************************************************************************
 
 RAbundVector MGClusterCommand::createRabund(ListVector list, map<string, int> nameMapCounts){
-    for(int i = 0; i < list->getNumBins(); i++) { 
-    
+    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);
+       }
+    
 }
 
 //**********************************************************************************************************************