X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=chimeraperseuscommand.cpp;h=0547802198960198d9d2a063bc498e79f04bfe33;hp=1835862f6b970ffdf7469002866f33a6682257ad;hb=cf9987b67aa49777a4c91c2d21f96e58bf17aa82;hpb=196c22d0f93ba48e8ec54ab76608b6e3ba5e68cc diff --git a/chimeraperseuscommand.cpp b/chimeraperseuscommand.cpp index 1835862..0547802 100644 --- a/chimeraperseuscommand.cpp +++ b/chimeraperseuscommand.cpp @@ -469,10 +469,7 @@ ChimeraPerseusCommand::ChimeraPerseusCommand(string option) { m->mothurConvert(temp, beta); 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); } } @@ -519,7 +516,7 @@ int ChimeraPerseusCommand::execute(){ if (hasCount) { CountTable* ct = new CountTable(); - ct->readTable(nameFile); + ct->readTable(nameFile, true, false); if (ct->hasGroupInfo()) { cparser = new SequenceCountParser(fastaFileNames[s], *ct); @@ -537,7 +534,7 @@ int ChimeraPerseusCommand::execute(){ if(processors == 1) { numSeqs = driverGroups(outputFileName, accnosFileName, newCountFile, 0, groups.size(), groups); if (dups) { - CountTable c; c.readTable(nameFile); + CountTable c; c.readTable(nameFile, true, false); if (!m->isBlank(newCountFile)) { ifstream in2; m->openInputFile(newCountFile, in2); @@ -562,7 +559,7 @@ int ChimeraPerseusCommand::execute(){ numChimeras = deconvoluteResults(uniqueNames, outputFileName, accnosFileName); }else { 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]); @@ -649,6 +646,11 @@ int ChimeraPerseusCommand::execute(){ if (itTypes != outputTypes.end()) { if ((itTypes->second).size() != 0) { current = (itTypes->second)[0]; m->setAccnosFile(current); } } + + itTypes = outputTypes.find("count"); + if (itTypes != outputTypes.end()) { + if ((itTypes->second).size() != 0) { current = (itTypes->second)[0]; m->setCountTableFile(current); } + } m->mothurOutEndLine(); m->mothurOut("Output File Names: "); m->mothurOutEndLine(); @@ -1044,10 +1046,10 @@ int ChimeraPerseusCommand::driver(string chimeraFileName, vector& seque } //report progress - if((i+1) % 100 == 0){ m->mothurOut("Processing sequence: " + toString(i+1) + "\n"); } + if((i+1) % 100 == 0){ m->mothurOutJustToScreen("Processing sequence: " + toString(i+1) + "\n"); } } - if((numSeqs) % 100 != 0){ m->mothurOut("Processing sequence: " + toString(numSeqs) + "\n"); } + if((numSeqs) % 100 != 0){ m->mothurOutJustToScreen("Processing sequence: " + toString(numSeqs) + "\n"); } chimeraFile.close(); accnosFile.close(); @@ -1068,7 +1070,7 @@ int ChimeraPerseusCommand::createProcessesGroups(string outputFName, string accn int num = 0; CountTable newCount; - if (hasCount && dups) { newCount.readTable(name); } + if (hasCount && dups) { newCount.readTable(name, true, false); } //sanity check if (groups.size() < processors) { processors = groups.size(); }