list = globaldata->gListVector;
string lastLabel = list->getLabel();
+ if (m->control_pressed) { return 0; }
+
//if the users enters label "0.06" and there is no "0.06" in their file use the next lowest label.
set<string> processedLabels;
set<string> userLabels = labels;
while((list != NULL) && ((allLines == 1) || (userLabels.size() != 0))) {
+ if(m->control_pressed) { for (int i = 0; i < outputNames.size(); i++) { remove(outputNames[i].c_str()); } return 0; }
+
if(allLines == 1 || labels.count(list->getLabel()) == 1){
error = process(list);
- if (error == 1) { return 0; }
+ if (error == 1) { for (int i = 0; i < outputNames.size(); i++) { remove(outputNames[i].c_str()); } return 0; }
processedLabels.insert(list->getLabel());
userLabels.erase(list->getLabel());
list = input->getListVector(lastLabel);
error = process(list);
- if (error == 1) { return 0; }
+ if (error == 1) { for (int i = 0; i < outputNames.size(); i++) { remove(outputNames[i].c_str()); } return 0; }
processedLabels.insert(list->getLabel());
userLabels.erase(list->getLabel());
list = input->getListVector();
}
-
+ if(m->control_pressed) { for (int i = 0; i < outputNames.size(); i++) { remove(outputNames[i].c_str()); } return 0; }
+
//output error messages about any remaining user labels
set<string>::iterator it;
bool needToRun = false;
list = input->getListVector(lastLabel);
error = process(list);
- if (error == 1) { return 0; }
+ if (error == 1) { for (int i = 0; i < outputNames.size(); i++) { remove(outputNames[i].c_str()); } return 0; }
delete list;
}
+ if(m->control_pressed) { for (int i = 0; i < outputNames.size(); i++) { remove(outputNames[i].c_str()); } return 0; }
+
m->mothurOutEndLine();
m->mothurOut("Output File Names: "); m->mothurOutEndLine();
for (int i = 0; i < outputNames.size(); i++) { m->mothurOut(outputNames[i]); m->mothurOutEndLine(); }
//for each bin in the list vector
for (int i = 0; i < list->size(); i++) {
-
+
+ if (m->control_pressed) { return 1; }
+
binnames = list->get(i);
while (binnames.find_first_of(',') != -1) {
name = binnames.substr(0,binnames.find_first_of(','));
string group = groupMap->getGroup(name);
if (group == "not found") {
m->mothurOut(name + " is missing from your group file. Please correct. "); m->mothurOutEndLine();
- remove(outputFileName.c_str());
return 1;
}else{
name = name + "|" + group + "|" + toString(i+1);
}
}else {
m->mothurOut(name + " is missing from your fasta or name file. Please correct. "); m->mothurOutEndLine();
- remove(outputFileName.c_str());
return 1;
}
string group = groupMap->getGroup(binnames);
if (group == "not found") {
m->mothurOut(binnames + " is missing from your group file. Please correct. "); m->mothurOutEndLine();
- remove(outputFileName.c_str());
return 1;
}else{
binnames = binnames + "|" + group + "|" + toString(i+1);
}
}else {
m->mothurOut(binnames + " is missing from your fasta or name file. Please correct. "); m->mothurOutEndLine();
- remove(outputFileName.c_str());
return 1;
}
}