exit(1);
}
}
+//**********************************************************************************************************************
+string ParseListCommand::getOutputFileNameTag(string type, string inputName=""){
+ try {
+ string outputFileName = "";
+ map<string, vector<string> >::iterator it;
+
+ //is this a type this command creates
+ it = outputTypes.find(type);
+ if (it == outputTypes.end()) { m->mothurOut("[ERROR]: this command doesn't create a " + type + " output file.\n"); }
+ else {
+ if (type == "list") { outputFileName = "list"; }
+ else { m->mothurOut("[ERROR]: No definition for type " + type + " output file tag.\n"); m->control_pressed = true; }
+ }
+ return outputFileName;
+ }
+ catch(exception& e) {
+ m->errorOut(e, "ParseListCommand", "getOutputFileNameTag");
+ exit(1);
+ }
+}
+
//**********************************************************************************************************************
ParseListCommand::ParseListCommand(){
try {
temp = new ofstream;
filehandles[gGroups[i]] = temp;
- string filename = fileroot + gGroups[i] + ".list";
+ string filename = fileroot + gGroups[i] + "." + getOutputFileNameTag("list");
outputNames.push_back(filename); outputTypes["list"].push_back(filename);
m->openOutputFile(filename, *temp);
}