+/***********************************************************************/
+vector<SharedRAbundVector*> SharedRAbundVector::getSharedRAbundVectors(){
+ try {
+ SharedUtil* util;
+ util = new SharedUtil();
+
+ util->setGroups(globaldata->Groups, globaldata->gGroupmap->namesOfGroups);
+
+ for (int i = 0; i < lookup.size(); i++) {
+ //if this sharedrabund is not from a group the user wants then delete it.
+ if (util->isValidGroup(lookup[i]->getGroup(), globaldata->Groups) == false) {
+ delete lookup[i]; lookup[i] = NULL;
+ lookup.erase(lookup.begin()+i);
+ i--;
+ }
+ }
+
+ delete util;
+
+ return lookup;
+ }
+ catch(exception& e) {
+ m->errorOut(e, "SharedRAbundVector", "getSharedRAbundVectors");
+ exit(1);
+ }
+}
+/***********************************************************************/
+
+RAbundVector SharedRAbundVector::getRAbundVector() {
+ try {
+ RAbundVector rav;
+
+ for (int i = 0; i < data.size(); i++) {
+ if(data[i].abundance != 0) {
+ rav.push_back(data[i].abundance);
+ }
+ }
+
+ rav.setLabel(label);
+ return rav;
+ }
+ catch(exception& e) {
+ m->errorOut(e, "SharedRAbundVector", "getRAbundVector");
+ exit(1);
+ }
+}
+/***********************************************************************/