X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=deconvolutecommand.cpp;h=8b73425fc5c2aefb2d7e3b4a87caf4fa8be44c40;hb=70491a12902e89b85cfa6b44a7b7fbe066ee2ac1;hp=f33a1400721093ee642c90d35c70fed703fdb6a5;hpb=1a5c2356c1b955c6ec024b2baf9f46377ee7c72e;p=mothur.git diff --git a/deconvolutecommand.cpp b/deconvolutecommand.cpp index f33a140..8b73425 100644 --- a/deconvolutecommand.cpp +++ b/deconvolutecommand.cpp @@ -198,17 +198,24 @@ int DeconvoluteCommand::execute() { map nameMap; map::iterator itNames; if (oldNameMapFName != "") { - m->readNames(oldNameMapFName, nameMap); - if (oldNameMapFName == outNameFile){ - variables["[tag]"] = "unique"; - outNameFile = getOutputFileName("name", variables); } + m->readNames(oldNameMapFName, nameMap); + if (oldNameMapFName == outNameFile){ + //prepare filenames and open files + map mvariables; + mvariables["[filename]"] = outputDir + m->getRootName(m->getSimpleName(inFastaName)); + mvariables["[tag]"] = "unique"; + outNameFile = getOutputFileName("name", mvariables); + } } CountTable ct; if (countfile != "") { - ct.readTable(countfile); - if (countfile == outCountFile){ - variables["[tag]"] = "unique"; - outCountFile = getOutputFileName("count", variables); } + ct.readTable(countfile, false); + if (countfile == outCountFile){ + //prepare filenames and open files + map mvariables; + mvariables["[filename]"] = outputDir + m->getRootName(m->getSimpleName(inFastaName)); + mvariables["[tag]"] = "unique"; + outCountFile = getOutputFileName("count", mvariables); } } if (m->control_pressed) { return 0; }