]> git.donarmstrong.com Git - mothur.git/blobdiff - readblast.h
added modify names parameter to set.dir
[mothur.git] / readblast.h
index 0b47b5942d7126cec59ce0923a66c1bc4c6ff4e1..97ce6c74cbf768aeec8d2f879fb7c8ad887a1042 100644 (file)
  */
 
 #include "mothur.h"
-#include "sparsematrix.hpp"
+#include "sparsedistancematrix.h"
 #include "nameassignment.hpp"
 
-/****************************************************************************************/
-struct DistNode {
-       int seq1;
-       int seq2;
-       float dist;
-       DistNode(int s1, int s2, float d) : seq1(s1), seq2(s2), dist(d) {}
-       DistNode() {}
-       ~DistNode() {}
-};
 /****************************************************************************************/
 
 //Note: this class creates a sparsematrix and list if the read is executed, but does not delete them on deconstruction.
@@ -34,11 +25,11 @@ public:
        ReadBlast(string, float, float, int, bool, bool); //blastfile, cutoff, penalty, length of overlap, min or max bsr, hclusterWanted
        ~ReadBlast() {}
        
-       void read(NameAssignment*);
-       SparseMatrix* getDistMatrix()           {       return matrix;          }
-       vector<DistNode> getOverlapMatrix()     {       return overlap;         }
-       string getOverlapFile()                         {       return overlapFile;     }
-       string getDistFile()                            {       return distFile;        }
+       int read(NameAssignment*);
+       SparseDistanceMatrix* getDistMatrix()           {       return matrix;          }
+       vector<seqDist> getOverlapMatrix()          {   return overlap;         }
+       string getOverlapFile()                     {   return overlapFile;     }
+       string getDistFile()                        {   return distFile;        }
        
 private:
        string blastfile, overlapFile, distFile;
@@ -47,10 +38,11 @@ private:
        bool minWanted;  //if true choose min bsr, if false choose max bsr
        bool hclusterWanted;
        
-       SparseMatrix* matrix;
-       vector<DistNode> overlap;
+       SparseDistanceMatrix* matrix;
+       vector<seqDist> overlap;
+       MothurOut* m;
        
-       void readNames(NameAssignment*);
+       int readNames(NameAssignment*);
 };
 
 /*******************************************************************************************/