+void ParseListCommand::process(SharedListVector* thisList) {
+ try {
+ string seq;
+
+ for(int i=0; i<thisList->size(); i++) {
+ parse(i, thisList); //parses data[i] list of sequence names
+ for (it=listGroups.begin(); it != listGroups.end(); it++) { //loop through map and set new list vectors
+ seq = it->second;
+ seq = seq.substr(1, seq.length()); //rips off extra comma
+ groupOfLists[it->first]->push_back(seq); //sets new listvector for each group
+ }
+ listGroups.clear();
+ }
+ //prints each new list file
+ for (int i=0; i<groupMap->getNumGroups(); i++) {
+ groupOfLists[groupMap->namesOfGroups[i]]->setLabel(thisList->getLabel());
+ groupOfLists[groupMap->namesOfGroups[i]]->print(*(filehandles[groupMap->namesOfGroups[i]]));
+ groupOfLists[groupMap->namesOfGroups[i]]->clear();
+ }
+
+ }
+ catch(exception& e) {
+ cout << "Standard Error: " << e.what() << " has occurred in the ParseListCommand class Function process. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+ exit(1);
+ }
+ catch(...) {
+ cout << "An unknown error has occurred in the ParseListCommand class function process. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+ exit(1);
+ }
+}
\ No newline at end of file