From: Sarah Westcott <mothur.westcott@gmail.com>
Date: Wed, 9 May 2012 16:47:34 +0000 (-0400)
Subject: working on get.coremicrobiom
X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=8a0b2fd6644dee848b262fcdea73b912a6054fed;p=mothur.git

working on get.coremicrobiom
---

diff --git a/Mothur.xcodeproj/project.pbxproj b/Mothur.xcodeproj/project.pbxproj
index 4553219..efac27e 100644
--- a/Mothur.xcodeproj/project.pbxproj
+++ b/Mothur.xcodeproj/project.pbxproj
@@ -2178,17 +2178,17 @@
 			isa = XCBuildConfiguration;
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
-				CONFIGURATION_TEMP_DIR = /Users/johnwestcott/desktop/debug;
+				CONFIGURATION_TEMP_DIR = /Users/SarahsWork/Desktop;
 				COPY_PHASE_STRIP = NO;
 				DEPLOYMENT_LOCATION = YES;
 				GCC_DYNAMIC_NO_PIC = NO;
 				GCC_MODEL_TUNING = G5;
 				GCC_OPTIMIZATION_LEVEL = 0;
-				INSTALL_PATH = /Users/johnwestcott/desktop/debug;
-				OBJROOT = /Users/johnwestcott/desktop/debug;
+				INSTALL_PATH = /Users/SarahsWork/Desktop/debug;
+				OBJROOT = /Users/SarahsWork/Desktop;
 				PRODUCT_NAME = Mothur;
 				SDKROOT = macosx10.6;
-				SYMROOT = /Users/johnwestcott/desktop/debug;
+				SYMROOT = /Users/SarahsWork/Desktop;
 			};
 			name = Debug;
 		};
@@ -2196,15 +2196,15 @@
 			isa = XCBuildConfiguration;
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
-				CONFIGURATION_TEMP_DIR = /Users/johnwestcott/desktop/debug;
+				CONFIGURATION_TEMP_DIR = /Users/SarahsWork/Desktop;
 				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
 				DEPLOYMENT_LOCATION = YES;
 				GCC_MODEL_TUNING = G5;
 				GCC_WARN_UNUSED_VALUE = YES;
-				INSTALL_PATH = /Users/johnwestcott/desktop/debug;
-				OBJROOT = /Users/johnwestcott/desktop/debug;
+				INSTALL_PATH = /Users/SarahsWork/Desktop/debug;
+				OBJROOT = /Users/SarahsWork/Desktop;
 				PRODUCT_NAME = Mothur;
-				SYMROOT = /Users/johnwestcott/desktop/debug;
+				SYMROOT = /Users/SarahsWork/Desktop;
 			};
 			name = Release;
 		};
diff --git a/commandfactory.cpp b/commandfactory.cpp
index c334b09..6d645f3 100644
--- a/commandfactory.cpp
+++ b/commandfactory.cpp
@@ -284,7 +284,7 @@ CommandFactory::CommandFactory(){
     commands["pcr.seqs"]            = "pcr.seqs";
     commands["create.database"]     = "create.database";
     commands["make.biom"]           = "make.biom";
-    commands["get.coremicrobiom"]   = "get.coremircrobiom";
+    commands["get.coremicrobiom"]   = "get.coremicrobiom";
 	commands["quit"]				= "MPIEnabled"; 
 
 }
diff --git a/getcoremicrobiomcommand.cpp b/getcoremicrobiomcommand.cpp
index 253e836..e089f1d 100644
--- a/getcoremicrobiomcommand.cpp
+++ b/getcoremicrobiomcommand.cpp
@@ -284,15 +284,13 @@ int GetCoreMicroBiomCommand::createTable(vector<SharedRAbundFloatVector*>& looku
             for (int j = 0; j < lookup.size(); j++) {
                 double relabund = lookup[j]->getAbundance(i);
                 int wholeRelabund = (int) (floor(relabund*100));
-                cout << i << '\t' << j << '\t' << relabund << '\t' << wholeRelabund << endl;
-                for (int k = 0; k < wholeRelabund; k++) { counts[k]++; }
+                for (int k = 0; k < wholeRelabund+1; k++) { counts[k]++; }
             }
             
             //add this otus info to table
             for (int j = 0; j < table.size(); j++) {
                 for (int k = 0; k < counts[j]; k++) { table[j][k]++; }
             }
-            
         }
 		
         //format output
@@ -301,7 +299,7 @@ int GetCoreMicroBiomCommand::createTable(vector<SharedRAbundFloatVector*>& looku
         
         //convert table counts to percents
         for (int i = 0; i < table.size(); i++) {
-            out << "Relabund-" << i << '\t';
+            out << "Relabund-" << i << "%\t";
             if (m->control_pressed) { break; }
             for (int j = 0; j < table[i].size(); j++) {  table[i][j] /= (double) numOtus; }
         }