X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=chimerauchimecommand.cpp;h=3a9f42b22e0715ccf1f68313439342269da81bf8;hb=ffa535cf04326227080b02594616971a2c3a5195;hp=e82dc1bc8dce5ffd0887025d5816b5eec8d0eab9;hpb=037b7fccc64a5c7d5d5c23a949273a912160a400;p=mothur.git diff --git a/chimerauchimecommand.cpp b/chimerauchimecommand.cpp index e82dc1b..3a9f42b 100644 --- a/chimerauchimecommand.cpp +++ b/chimerauchimecommand.cpp @@ -564,14 +564,12 @@ ChimeraUchimeCommand::ChimeraUchimeCommand(string option) { temp = validParameter.validFile(parameters, "dereplicate", false); - if (temp == "not found") { - if (groupfile != "") { temp = "false"; } - else { temp = "true"; } - } + if (temp == "not found") { temp = "false"; } dups = m->isTrue(temp); if (hasName && (templatefile != "self")) { m->mothurOut("You have provided a namefile and the reference parameter is not set to self. I am not sure what reference you are trying to use, aborting."); m->mothurOutEndLine(); abort=true; } + if (hasCount && (templatefile != "self")) { m->mothurOut("You have provided a countfile and the reference parameter is not set to self. I am not sure what reference you are trying to use, aborting."); m->mothurOutEndLine(); abort=true; } if (hasGroup && (templatefile != "self")) { m->mothurOut("You have provided a group file and the reference parameter is not set to self. I am not sure what reference you are trying to use, aborting."); m->mothurOutEndLine(); abort=true; } //look for uchime exe @@ -677,7 +675,7 @@ int ChimeraUchimeCommand::execute(){ int error; if (hasCount) { CountTable ct; - ct.readTable(nameFile); + ct.readTable(nameFile, true, false); for(map::iterator it = seqs.begin(); it != seqs.end(); it++) { int num = ct.getNumSeqs(it->first); if (num == 0) { error = 1; } @@ -728,7 +726,7 @@ int ChimeraUchimeCommand::execute(){ if(processors == 1) { totalSeqs = driverGroups(outputFileName, newFasta, accnosFileName, alnsFileName, newCountFile, 0, groups.size(), groups); if (hasCount && dups) { - CountTable c; c.readTable(nameFile); + CountTable c; c.readTable(nameFile, true, false); if (!m->isBlank(newCountFile)) { ifstream in2; m->openInputFile(newCountFile, in2); @@ -758,7 +756,7 @@ int ChimeraUchimeCommand::execute(){ if (hasCount) { set doNotRemove; - CountTable c; c.readTable(newCountFile); + CountTable c; c.readTable(newCountFile, true, true); vector namesInTable = c.getNamesOfSeqs(); for (int i = 0; i < namesInTable.size(); i++) { int temp = c.getNumSeqs(namesInTable[i]); @@ -1798,7 +1796,7 @@ int ChimeraUchimeCommand::createProcessesGroups(string outputFName, string filen int num = 0; CountTable newCount; - if (hasCount && dups) { newCount.readTable(nameFile); } + if (hasCount && dups) { newCount.readTable(nameFile, true, false); } //sanity check if (groups.size() < processors) { processors = groups.size(); }