+//**********************************************************************************************************************
+int SharedCommand::ListGroupSameSeqs() {
+ try {
+
+ int error = 0;
+
+ vector<string> groupMapsSeqs = groupMap->getNamesSeqs();
+
+ set<string> groupNamesSeqs;
+ for(int i = 0; i < groupMapsSeqs.size(); i++) {
+ groupNamesSeqs.insert(groupMapsSeqs[i]);
+ }
+
+
+ //go through list and if group returns "not found" output it
+ for (int i = 0; i < SharedList->getNumBins(); i++) {
+ if (m->control_pressed) { return 0; }
+
+ string names = SharedList->get(i);
+
+ vector<string> listNames;
+ m->splitAtComma(names, listNames);
+
+ for (int j = 0; j < listNames.size(); j++) {
+ int num = groupNamesSeqs.count(listNames[j]);
+
+ if (num == 0) { error = 1; m->mothurOut("[ERROR]: " + listNames[j] + " is in your listfile and not in your groupfile. Please correct."); m->mothurOutEndLine(); }
+ else { groupNamesSeqs.erase(listNames[j]); }
+ }
+ }
+
+ for (set<string>::iterator itGroupSet = groupNamesSeqs.begin(); itGroupSet != groupNamesSeqs.end(); itGroupSet++) {
+ error = 1;
+ m->mothurOut("[ERROR]: " + (*itGroupSet) + " is in your groupfile and not your listfile. Please correct."); m->mothurOutEndLine();
+ }
+
+ return error;
+ }
+ catch(exception& e) {
+ m->errorOut(e, "SharedCommand", "ListGroupSameSeqs");
+ exit(1);
+ }
+}