+/***********************************************************************/
+SharedRAbundVector SharedOrderVector::getSharedRAbundVector(string group) {
+ try {
+ SharedRAbundVector sharedRav(data.size());
+
+ sharedRav.setLabel(label);
+ sharedRav.setGroup(group);
+
+ for (int i = 0; i < data.size(); i++) {
+ if (data[i].group == group) {
+ sharedRav.set(data[i].abundance, sharedRav.getAbundance(data[i].abundance) + 1, data[i].group);
+ }
+ }
+ return sharedRav;
+ }
+ catch(exception& e) {
+ m->errorOut(e, "SharedOrderVector", "getSharedRAbundVector");
+ exit(1);
+ }
+}
+/***********************************************************************/
+vector<SharedRAbundVector*> SharedOrderVector::getSharedRAbundVector() {
+ try {
+ SharedUtil* util;
+ util = new SharedUtil();
+ vector<SharedRAbundVector*> lookup;
+
+ vector<string> Groups = m->getGroups();
+ vector<string> allGroups = m->getAllGroups();
+ util->setGroups(Groups, allGroups);
+ util->getSharedVectors(Groups, lookup, this);
+ m->setGroups(Groups);
+ m->setAllGroups(allGroups);
+
+ return lookup;
+ }
+ catch(exception& e) {
+ m->errorOut(e, "SharedOrderVector", "getSharedRAbundVector");
+ exit(1);
+ }
+}
+/***********************************************************************/
+SharedSAbundVector SharedOrderVector::getSharedSAbundVector(string group) {
+ try {
+
+ SharedRAbundVector sharedRav(this->getSharedRAbundVector(group));
+ return sharedRav.getSharedSAbundVector();
+
+ }
+ catch(exception& e) {
+ m->errorOut(e, "SharedOrderVector", "getSharedSAbundVector");
+ exit(1);
+ }
+}