+ if (wroteAccnos) {
+ outputNames.push_back(outputFileNameAccnos); outputTypes["accnos"].push_back(outputFileNameAccnos);
+
+ //use remove.seqs to create new name, group and count file
+ if ((countfile != "") || (namefile != "") || (groupfile != "")) {
+ string inputString = "accnos=" + outputFileNameAccnos;
+
+ if (countfile != "") { inputString += ", count=" + countfile; }
+ else{
+ if (namefile != "") { inputString += ", name=" + namefile; }
+ if (groupfile != "") { inputString += ", group=" + groupfile; }
+ }
+
+ m->mothurOut("/******************************************/"); m->mothurOutEndLine();
+ m->mothurOut("Running command: remove.seqs(" + inputString + ")"); m->mothurOutEndLine();
+ m->mothurCalling = true;
+
+ Command* removeCommand = new RemoveSeqsCommand(inputString);
+ removeCommand->execute();
+
+ map<string, vector<string> > filenames = removeCommand->getOutputFiles();
+
+ delete removeCommand;
+ m->mothurCalling = false;
+ m->mothurOut("/******************************************/"); m->mothurOutEndLine();
+
+ if (groupfile != "") {
+ thisOutputDir = outputDir;
+ if (outputDir == "") { thisOutputDir += m->hasPath(groupfile); }
+ variables["[filename]"] = thisOutputDir + m->getRootName(m->getSimpleName(groupfile));
+ string outGroup = getOutputFileName("group", variables);
+ m->renameFile(filenames["group"][0], outGroup);
+ outputNames.push_back(outGroup); outputTypes["group"].push_back(outGroup);
+ }
+
+ if (namefile != "") {
+ thisOutputDir = outputDir;
+ if (outputDir == "") { thisOutputDir += m->hasPath(namefile); }
+ variables["[filename]"] = thisOutputDir + m->getRootName(m->getSimpleName(namefile));
+ string outName = getOutputFileName("name", variables);
+ m->renameFile(filenames["name"][0], outName);
+ outputNames.push_back(outName); outputTypes["name"].push_back(outName);
+ }
+
+ if (countfile != "") {
+ thisOutputDir = outputDir;
+ if (outputDir == "") { thisOutputDir += m->hasPath(countfile); }
+ variables["[filename]"] = thisOutputDir + m->getRootName(m->getSimpleName(countfile));
+ string outCount = getOutputFileName("count", variables);
+ m->renameFile(filenames["count"][0], outCount);
+ outputNames.push_back(outCount); outputTypes["count"].push_back(outCount);
+ }
+ }
+ }