]> git.donarmstrong.com Git - mothur.git/commitdiff
working on get.coremicrobiom
authorSarah Westcott <mothur.westcott@gmail.com>
Wed, 9 May 2012 16:47:34 +0000 (12:47 -0400)
committerSarah Westcott <mothur.westcott@gmail.com>
Wed, 9 May 2012 16:47:34 +0000 (12:47 -0400)
Mothur.xcodeproj/project.pbxproj
commandfactory.cpp
getcoremicrobiomcommand.cpp

index 4553219568d78e02ea441d05a475b063419a95b8..efac27e62e5b7f4efe54a9b181622afeeed50281 100644 (file)
                        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;
                };
                        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;
                };
index c334b095abbc65a5bd9e40cc6f2160f6c37d3e2e..6d645f3116d1bd81e690a27b65f469228640ca59 100644 (file)
@@ -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"; 
 
 }
index 253e836ab4d2a378d51984ffe81a4264002788d2..e089f1dc386925aed7f2ef03925ef572375ff14e 100644 (file)
@@ -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; }
         }