X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=deconvolutecommand.cpp;h=51fa43b39f87f06a3054808acb4937e05ae2337f;hb=372fb21ea66ced432b109225851a1b80ef0491a3;hp=f33a1400721093ee642c90d35c70fed703fdb6a5;hpb=deba0af0ccdcb6005ed5b2b82649b137c63fbdf7;p=mothur.git diff --git a/deconvolutecommand.cpp b/deconvolutecommand.cpp index f33a140..51fa43b 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); + 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; }