X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=seqsummarycommand.cpp;h=88478a10ec86f97802a1b5b152fcf434c7e6dc14;hb=cac38e9e251998fa0b825d00189534534948d226;hp=0e3b70c1db3824084a51fb0db1c88630285878c2;hpb=3a5dd9e428ab93a6dcdce7912e8ebb977be0b893;p=mothur.git diff --git a/seqsummarycommand.cpp b/seqsummarycommand.cpp index 0e3b70c..88478a1 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(); } @@ -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, //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 = 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;