X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=deconvolutecommand.cpp;h=98109ef33c488a071b04ad5ada84ffcab9d2e1f8;hp=f33a1400721093ee642c90d35c70fed703fdb6a5;hb=b206f634aae1b4ce13978d203247fb64757d5482;hpb=1a5c2356c1b955c6ec024b2baf9f46377ee7c72e diff --git a/deconvolutecommand.cpp b/deconvolutecommand.cpp index f33a140..98109ef 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, true, 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; }