]> git.donarmstrong.com Git - mothur.git/blobdiff - trimflowscommand.cpp
added mothurgetpid function. fixed bug with align.seqs related to g++ 4.8 change...
[mothur.git] / trimflowscommand.cpp
index fd55edf25ede0b4de807bef17dadb861b44c03a8..37beccd53455ec4f07cabb24ac88b1a3e2f28253 100644 (file)
@@ -395,7 +395,7 @@ int TrimFlowsCommand::driverCreateTrim(string flowFileName, string trimFlowFileN
                
                if(line->start == 0){
                        flowFile >> numFlows; m->gobble(flowFile);
-                       scrapFlowFile << maxFlows << endl;
+                       scrapFlowFile << numFlows << endl;
                        trimFlowFile << maxFlows << endl;
                        if(allFiles){
                                for(int i=0;i<thisBarcodePrimerComboFileNames.size();i++){
@@ -599,6 +599,7 @@ void TrimFlowsCommand::getOligos(vector<vector<string> >& outFlowFileNames){
                                else if(type == "REVERSE"){
                                        string oligoRC = reverseOligo(oligo);
                                        revPrimer.push_back(oligoRC);
+                    if (m->debug) { m->mothurOut("[DEBUG]: reverse oligos = " + oligoRC + ".\n"); }
                                }
                                else if(type == "BARCODE"){
                                        oligosFile >> group;
@@ -836,7 +837,7 @@ int TrimFlowsCommand::createProcessesCreateTrim(string flowFileName, string trim
                                        for(int i=0;i<tempBarcodePrimerComboFileNames.size();i++){
                                                for(int j=0;j<tempBarcodePrimerComboFileNames[0].size();j++){
                             if (tempBarcodePrimerComboFileNames[i][j] != "") {
-                                tempBarcodePrimerComboFileNames[i][j] += toString(getpid()) + ".temp";
+                                tempBarcodePrimerComboFileNames[i][j] += m->mothurGetpid(process) + ".temp";
                                 ofstream temp;
                                 m->openOutputFile(tempBarcodePrimerComboFileNames[i][j], temp);
                                 temp.close();
@@ -845,9 +846,9 @@ int TrimFlowsCommand::createProcessesCreateTrim(string flowFileName, string trim
                                        }
                                }
                                driverCreateTrim(flowFileName,
-                                                                (trimFlowFileName + toString(getpid()) + ".temp"),
-                                                                (scrapFlowFileName + toString(getpid()) + ".temp"),
-                                                                (fastaFileName + toString(getpid()) + ".temp"),
+                                                                (trimFlowFileName + m->mothurGetpid(process) + ".temp"),
+                                                                (scrapFlowFileName + m->mothurGetpid(process) + ".temp"),
+                                                                (fastaFileName + m->mothurGetpid(process) + ".temp"),
                                                                 tempBarcodePrimerComboFileNames, lines[process]);
 
                                exit(0);