listfile = validParameter.validFile(parameters, "list", true);
if (listfile == "not open") { listfile = ""; abort = true; }
else if (listfile == "not found") { listfile = ""; }
- else { format = "list"; inputfile = listfile; }
+ else { format = "list"; inputfile = listfile; m->setListFile(listfile); }
rabundfile = validParameter.validFile(parameters, "rabund", true);
if (rabundfile == "not open") { rabundfile = ""; abort = true; }
else if (rabundfile == "not found") { rabundfile = ""; }
- else { format = "rabund"; inputfile = rabundfile; }
+ else { format = "rabund"; inputfile = rabundfile; m->setRabundFile(rabundfile); }
//check for optional parameter and set defaults
set<string> processedLabels;
set<string> userLabels = labels;
- if (m->control_pressed) { outputTypes.clear(); out.close(); remove(filename.c_str()); delete sabund; delete input; return 0; }
+ if (m->control_pressed) { outputTypes.clear(); out.close(); m->mothurRemove(filename); delete sabund; delete input; return 0; }
while((sabund != NULL) && ((allLines == 1) || (userLabels.size() != 0))) {
sabund->print(out);
- if (m->control_pressed) { outputTypes.clear(); out.close(); remove(filename.c_str()); delete sabund; delete input; return 0; }
+ if (m->control_pressed) { outputTypes.clear(); out.close(); m->mothurRemove(filename); delete sabund; delete input; return 0; }
processedLabels.insert(sabund->getLabel());
userLabels.erase(sabund->getLabel());
m->mothurOut(sabund->getLabel()); m->mothurOutEndLine();
sabund->print(out);
- if (m->control_pressed) { outputTypes.clear(); out.close(); remove(filename.c_str()); delete sabund; delete input; return 0; }
+ if (m->control_pressed) { outputTypes.clear(); out.close(); m->mothurRemove(filename); delete sabund; delete input; return 0; }
processedLabels.insert(sabund->getLabel());
userLabels.erase(sabund->getLabel());
sabund->print(out);
delete sabund;
- if (m->control_pressed) { outputTypes.clear(); out.close(); remove(filename.c_str()); delete input; return 0; }
+ if (m->control_pressed) { outputTypes.clear(); out.close(); m->mothurRemove(filename); delete input; return 0; }
}