X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=seqerrorcommand.cpp;h=4e5abc95b7189bd8d5178fae77c00ac17117311d;hb=HEAD;hp=5879241372dd3b60b34683683a0c1edbcbd64d57;hpb=a8e2df1b96a57f5f29576b08361b86a96a8eff4f;p=mothur.git diff --git a/seqerrorcommand.cpp b/seqerrorcommand.cpp index 5879241..4e5abc9 100644 --- a/seqerrorcommand.cpp +++ b/seqerrorcommand.cpp @@ -358,7 +358,7 @@ int SeqErrorCommand::execute(){ if(namesFileName != "") { weights = getWeights(); } else if (countfile != "") { CountTable ct; - ct.readTable(countfile, false); + ct.readTable(countfile, false, false); weights = ct.getNameMap(); } @@ -430,13 +430,6 @@ int SeqErrorCommand::execute(){ m->mothurOut("It took " + toString(time(NULL) - start) + " secs to check " + toString(numSeqs) + " sequences."); m->mothurOutEndLine(); - //set fasta file as new current fastafile - string current = ""; - itTypes = outputTypes.find("errorseq"); - if (itTypes != outputTypes.end()) { - if ((itTypes->second).size() != 0) { current = (itTypes->second)[0]; m->setFastaFile(current); } - } - m->mothurOutEndLine(); m->mothurOut("Output File Names: "); m->mothurOutEndLine(); for (int i = 0; i < outputNames.size(); i++) { m->mothurOut(outputNames[i]); m->mothurOutEndLine(); } @@ -462,18 +455,18 @@ int SeqErrorCommand::createProcesses(string filename, string qFileName, string r //loop through and create all the processes you want while (process != processors) { - int pid = fork(); + pid_t pid = fork(); if (pid > 0) { processIDS.push_back(pid); //create map from line number to pid so you can append files in correct order later process++; }else if (pid == 0){ - num = driver(filename, qFileName, rFileName, summaryFileName + toString(getpid()) + ".temp", errorOutputFileName+ toString(getpid()) + ".temp", chimeraOutputFileName + toString(getpid()) + ".temp", lines[process], qLines[process], rLines[process]); + num = driver(filename, qFileName, rFileName, summaryFileName + m->mothurGetpid(process) + ".temp", errorOutputFileName+ m->mothurGetpid(process) + ".temp", chimeraOutputFileName + m->mothurGetpid(process) + ".temp", lines[process], qLines[process], rLines[process]); //pass groupCounts to parent ofstream out; - string tempFile = filename + toString(getpid()) + ".info.temp"; + string tempFile = filename + m->mothurGetpid(process) + ".info.temp"; m->openOutputFile(tempFile, out); //output totalBases and totalMatches