+
+ while((SharedList != NULL) && ((globaldata->allLines == 1) || (userLabels.size() != 0) || (userLines.size() != 0))) {
+
+
+ if(globaldata->allLines == 1 || globaldata->lines.count(count) == 1 || globaldata->labels.count(SharedList->getLabel()) == 1){
+
+ shared->getSharedVectors(SharedList); //fills sharedGroups with new info and updates sharedVector
+ printSharedData(); //prints info to the .shared file
+
+ processedLabels.insert(SharedList->getLabel());
+ userLabels.erase(SharedList->getLabel());
+ userLines.erase(count);
+ }
+
+ if ((anyLabelsToProcess(SharedList->getLabel(), userLabels, errorOff) == true) && (processedLabels.count(lastList->getLabel()) != 1)) {
+ shared->getSharedVectors(lastList); //fills sharedGroups with new info and updates sharedVector
+ printSharedData(); //prints info to the .shared file
+
+ processedLabels.insert(lastList->getLabel());
+ userLabels.erase(lastList->getLabel());
+ }
+
+ if (count != 1) { delete lastList; }
+ lastList = SharedList;
+ SharedList = input->getSharedListVector(); //get new list vector to process
+ count++;
+
+ //if (count != 1) { for (int i = 0; i < lastLookup.size(); i++) { delete lastLookup[i]; } }
+ //lastLookup = lookup;
+ //if (SharedList != NULL) { lookup = SharedList->getSharedRAbundVector(); }
+ }
+
+ //output error messages about any remaining user labels
+ set<string>::iterator it;
+ bool needToRun = false;
+ for (it = userLabels.begin(); it != userLabels.end(); it++) {
+ //cout << "Your file does not include the label "<< *it;
+ if (processedLabels.count(lastList->getLabel()) != 1) {
+ //cout << ". I will use " << lastList->getLabel() << "." << endl;
+ needToRun = true;
+ }else {
+ //cout << ". Please refer to " << lastList->getLabel() << "." << endl;
+ }
+ }
+
+ //run last line if you need to
+ if (needToRun == true) {
+ shared->getSharedVectors(lastList); //fills sharedGroups with new info and updates sharedVector