]> git.donarmstrong.com Git - mothur.git/blobdiff - pairwiseseqscommand.cpp
added mothurOutJustToScreen function and changed all counter outputs to use it.
[mothur.git] / pairwiseseqscommand.cpp
index e937b1661b90b5f8e3340178222c21a9a9cd8d9e..7d96e31d1eefb534729e421b266092db1536aa46 100644 (file)
@@ -564,7 +564,7 @@ void PairwiseSeqsCommand::createProcesses(string filename) {
                        string extension = toString(i) + ".temp";
 
                        // Allocate memory for thread data.
-                       pairwiseData* tempDist = new pairwiseData((filename+extension), align, "square", Estimators[0], countends, output, alignDB, m, lines[i+1].start, lines[i+1].end, match, misMatch, gapOpen, gapExtend, longestBase, i);
+                       pairwiseData* tempDist = new pairwiseData((filename+extension), align, "square", Estimators[0], countends, output, alignDB, m, lines[i+1].start, lines[i+1].end, match, misMatch, gapOpen, gapExtend, longestBase, cutoff, i);
                        pDataArray.push_back(tempDist);
                        processIDS.push_back(i);
                        
@@ -643,8 +643,7 @@ int PairwiseSeqsCommand::driver(int startLine, int endLine, string dFileName, fl
                outFile << setprecision(4);
                
                if((output == "lt") && startLine == 0){ outFile << alignDB.getNumSeqs() << endl;        }
-               int countSmall = 0;
-        int countAll = 0;
+               
                for(int i=startLine;i<endLine;i++){
                        if(output == "lt")      {       
                                string name = alignDB.get(i).getName();
@@ -682,9 +681,6 @@ int PairwiseSeqsCommand::driver(int startLine, int endLine, string dFileName, fl
                 //cout << "dist = " << dist << endl;
                                                
                                if(dist <= cutoff){
-                    if (dist < 0.01) { countSmall++; }
-                    countAll++;
-
                                        if (output == "column") { outFile << alignDB.get(i).getName() << ' ' << alignDB.get(j).getName() << ' ' << dist << endl; }
                                }
                                if (output == "lt") {  outFile << dist << '\t'; }
@@ -693,12 +689,12 @@ int PairwiseSeqsCommand::driver(int startLine, int endLine, string dFileName, fl
                        if (output == "lt") { outFile << endl; }
                        
                        if(i % 100 == 0){
-                               m->mothurOut(toString(i) + "\t" + toString(time(NULL) - startTime)); m->mothurOutEndLine();
+                               m->mothurOutJustToScreen(toString(i) + "\t" + toString(time(NULL) - startTime)+"\n");
                        }
                        
                }
-               m->mothurOut(toString(endLine-1) + "\t" + toString(time(NULL) - startTime)); m->mothurOutEndLine();
-               cout << "num less than 0.01 = " << countSmall << " of " << countAll << endl;
+               m->mothurOutJustToScreen(toString(endLine-1) + "\t" + toString(time(NULL) - startTime)+"\n");
+               
                outFile.close();
         delete alignment;
         delete distCalculator;
@@ -787,11 +783,11 @@ int PairwiseSeqsCommand::driver(int startLine, int endLine, string dFileName, st
                        outFile << endl; 
                        
                        if(i % 100 == 0){
-                               m->mothurOut(toString(i) + "\t" + toString(time(NULL) - startTime)); m->mothurOutEndLine();
+                               m->mothurOutJustToScreen(toString(i) + "\t" + toString(time(NULL) - startTime)+"\n"); 
                        }
                        
                }
-               m->mothurOut(toString(endLine-1) + "\t" + toString(time(NULL) - startTime)); m->mothurOutEndLine();
+               m->mothurOutJustToScreen(toString(endLine-1) + "\t" + toString(time(NULL) - startTime)+"\n");
                
                outFile.close();
         delete alignment;