]> git.donarmstrong.com Git - mothur.git/commitdiff
edited createRabund function
authorKathryn Iverson <kd.iverson@gmail.com>
Wed, 20 Jun 2012 21:34:14 +0000 (17:34 -0400)
committerKathryn Iverson <kd.iverson@gmail.com>
Wed, 20 Jun 2012 21:34:14 +0000 (17:34 -0400)
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);
+       }
+    
 }
 
 //**********************************************************************************************************************