X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=chimerapintailcommand.cpp;h=0b8e5940777090cdc6aef97829c63f96ad4503d8;hb=a89c6295ae9a35fcaaab7fa50dcb68360dd543b0;hp=d2b73998da9e0319880a8baf5948ed15a6132ae6;hpb=deba0af0ccdcb6005ed5b2b82649b137c63fbdf7;p=mothur.git diff --git a/chimerapintailcommand.cpp b/chimerapintailcommand.cpp index d2b7399..0b8e594 100644 --- a/chimerapintailcommand.cpp +++ b/chimerapintailcommand.cpp @@ -41,7 +41,7 @@ string ChimeraPintailCommand::getHelpString(){ try { string helpString = ""; helpString += "The chimera.pintail command reads a fastafile and referencefile and outputs potentially chimeric sequences.\n"; - helpString += "This command was created using the algorythms described in the 'At Least 1 in 20 16S rRNA Sequence Records Currently Held in the Public Repositories is Estimated To Contain Substantial Anomalies' paper by Kevin E. Ashelford 1, Nadia A. Chuzhanova 3, John C. Fry 1, Antonia J. Jones 2 and Andrew J. Weightman 1.\n"; + helpString += "This command was created using the algorithms described in the 'At Least 1 in 20 16S rRNA Sequence Records Currently Held in the Public Repositories is Estimated To Contain Substantial Anomalies' paper by Kevin E. Ashelford 1, Nadia A. Chuzhanova 3, John C. Fry 1, Antonia J. Jones 2 and Andrew J. Weightman 1.\n"; helpString += "The chimera.pintail command parameters are fasta, reference, filter, mask, processors, window, increment, conservation and quantile.\n"; helpString += "The fasta parameter allows you to enter the fasta file containing your potentially chimeric sequences, and is required unless you have a valid current fasta file. \n"; helpString += "You may enter multiple fasta files by separating their names with dashes. ie. fasta=abrecovery.fasta-amzon.fasta \n"; @@ -636,10 +636,10 @@ int ChimeraPintailCommand::driver(linePair* filePos, string outputFName, string #endif //report progress - if((count) % 100 == 0){ m->mothurOut("Processing sequence: " + toString(count)); m->mothurOutEndLine(); } + if((count) % 100 == 0){ m->mothurOutJustToScreen("Processing sequence: " + toString(count) + "\n"); } } //report progress - if((count) % 100 != 0){ m->mothurOut("Processing sequence: " + toString(count)); m->mothurOutEndLine(); } + if((count) % 100 != 0){ m->mothurOutJustToScreen("Processing sequence: " + toString(count) + "\n"); } out.close(); out2.close(); @@ -695,10 +695,10 @@ int ChimeraPintailCommand::driverMPI(int start, int num, MPI_File& inMPI, MPI_Fi delete candidateSeq; //report progress - if((i+1) % 100 == 0){ cout << "Processing sequence: " << (i+1) << endl; m->mothurOutJustToLog("Processing sequence: " + toString(i+1) + "\n"); } + if((i+1) % 100 == 0){ cout << "Processing sequence: " << (i+1) << endl; } } //report progress - if(num % 100 != 0){ cout << "Processing sequence: " << num << endl; m->mothurOutJustToLog("Processing sequence: " + toString(num) + "\n"); } + if(num % 100 != 0){ cout << "Processing sequence: " << num << endl; } return 0; @@ -720,17 +720,17 @@ int ChimeraPintailCommand::createProcesses(string outputFileName, string filenam //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(lines[process], outputFileName + toString(getpid()) + ".temp", filename, accnos + toString(getpid()) + ".temp"); + num = driver(lines[process], outputFileName + toString(m->mothurGetpid(process)) + ".temp", filename, accnos + toString(m->mothurGetpid(process)) + ".temp"); //pass numSeqs to parent ofstream out; - string tempFile = outputFileName + toString(getpid()) + ".num.temp"; + string tempFile = outputFileName + toString(m->mothurGetpid(process)) + ".num.temp"; m->openOutputFile(tempFile, out); out << num << endl; out.close();