]> git.donarmstrong.com Git - mothur.git/blobdiff - distancedb.cpp
added getline function to mothur and modified places where we use getline to use...
[mothur.git] / distancedb.cpp
index ce7485469fadce116664f4f26d5556192fe5866c..30f93597983e9c83fdc1ffcf54fb1998dc6112d0 100644 (file)
@@ -8,9 +8,6 @@
  */
 
 
-using namespace std;
-
-
 #include "database.hpp"
 #include "sequence.hpp"
 #include "distancedb.hpp"
@@ -32,18 +29,17 @@ DistanceDB::DistanceDB(string fastaFileName, string distanceFileName) : Database
        mostSimSequenceVector.resize(numCandSeqs);
        
        for(int i=0;i<numCandSeqs;i++){
-               inputData >> candidateSeqName >> closestMatch.seqName >> closestMatch.indexNumber >> closestMatch.simScore;
-//             getline(inputData, junk);       
+               inputData >> candidateSeqName >> closestMatch.seqName >> closestMatch.indexNumber >> closestMatch.simScore;     
                mostSimSequenceVector[i] = closestMatch;
        }
-       cout << numCandSeqs << endl;
+       mothurOut(toString(numCandSeqs)); mothurOutEndLine();
        searchIndex = 0;
        inputData.close();
 }
 
 /**************************************************************************************************/
 
-Sequence* DistanceDB::findClosestSequence(Sequence* candidateSeq){
+Sequence DistanceDB::findClosestSequence(Sequence* candidateSeq){
        
        hit simAccession = mostSimSequenceVector[searchIndex];
 //     string candidateSeqName, closestMatchSeqName, junk;