]> git.donarmstrong.com Git - mothur.git/blobdiff - sharedlistvector.cpp
changed heatmap and venn command to use vector of sharedrabunds instead of order...
[mothur.git] / sharedlistvector.cpp
index 06c8effdb66b4ea1bbf64b899e5918461134ea60..b5624508ac792aa82d367ed04ed1fbaf571d4cd6 100644 (file)
@@ -16,6 +16,7 @@ using namespace std;
 #include "ordervector.hpp"
 #include "sharedlistvector.h"
 #include "sharedordervector.h"
+#include "sharedutilities.h"
 
 /***********************************************************************/
 
@@ -284,6 +285,28 @@ SharedRAbundVector SharedListVector::getSharedRAbundVector(string groupName) {
                exit(1);
        }
 }
+/***********************************************************************/
+vector<SharedRAbundVector*> SharedListVector::getSharedRAbundVector() {
+       try {
+               SharedUtil* util;
+               util = new SharedUtil();
+               vector<SharedRAbundVector*> lookup;
+               
+               util->setGroups(globaldata->Groups, globaldata->gGroupmap->namesOfGroups);
+               util->getSharedVectors(globaldata->Groups, lookup, this->getSharedOrderVector());
+               
+               return lookup;
+       }
+       catch(exception& e) {
+               cout << "Standard Error: " << e.what() << " has occurred in the SharedListVector class Function getSharedRAbundVector. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+               exit(1);
+       }
+       catch(...) {
+               cout << "An unknown error has occurred in the SharedListVector class function getSharedRAbundVector. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+               exit(1);
+       }
+       
+}
 
 /***********************************************************************/
 SharedSAbundVector SharedListVector::getSharedSAbundVector(string groupName) {