X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=seqsummarycommand.cpp;h=3f7565923cb57d11673d581215c74509d1ac40b8;hb=60928795782d8f8648ec373d6a96b53032a77429;hp=e6b037b6bcafafa6c7ccf5aafa9731de3d7ba864;hpb=d39f94cf9bceeae887b211eec862da5c9c77e10d;p=mothur.git diff --git a/seqsummarycommand.cpp b/seqsummarycommand.cpp index e6b037b..3f75659 100644 --- a/seqsummarycommand.cpp +++ b/seqsummarycommand.cpp @@ -203,7 +203,7 @@ int SeqSummaryCommand::execute(){ if (namefile != "") { nameMap = m->readNames(namefile); } else if (countfile != "") { CountTable ct; - ct.readTable(countfile, false); + ct.readTable(countfile, false, false); nameMap = ct.getNameMap(); } @@ -376,7 +376,7 @@ int SeqSummaryCommand::execute(){ double meanstartPosition, meanendPosition, meanseqLength, meanambigBases, meanlongHomoPolymer; - meanstartPosition /= (double) size; meanendPosition /= (double) size; meanlongHomoPolymer /= (double) size; meanseqLength /= (double) size; meanambigBases /= (double) size; + meanstartPosition = meanStartPosition / (double) size; meanendPosition = meanEndPosition /(double) size; meanlongHomoPolymer = meanLongHomoPolymer / (double) size; meanseqLength = meanSeqLength / (double) size; meanambigBases = meanAmbigBases /(double) size; int ptile0_25 = int(size * 0.025); int ptile25 = int(size * 0.250); @@ -449,7 +449,8 @@ int SeqSummaryCommand::driverCreateSummary(vector& startPosition, vectorcontrol_pressed) { in.close(); outSummary.close(); return 1; } @@ -479,7 +480,6 @@ int SeqSummaryCommand::driverCreateSummary(vector& startPosition, vector& startPosition, 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 = driverCreateSummary(startPosition, endPosition, seqLength, ambigBases, longHomoPolymer, fastafile, sumFile + toString(getpid()) + ".temp", lines[process]); + num = driverCreateSummary(startPosition, endPosition, seqLength, ambigBases, longHomoPolymer, fastafile, sumFile + m->mothurGetpid(process) + ".temp", lines[process]); //pass numSeqs to parent ofstream out; - string tempFile = fastafile + toString(getpid()) + ".num.temp"; + string tempFile = fastafile + m->mothurGetpid(process) + ".num.temp"; m->openOutputFile(tempFile, out); out << num << endl;