X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=readblast.h;h=97ce6c74cbf768aeec8d2f879fb7c8ad887a1042;hb=3914b0d6480f67df53b1e838f51c4e6155710434;hp=0b47b5942d7126cec59ce0923a66c1bc4c6ff4e1;hpb=c82900be3ceed3d9bc491bdc98b1819ef85c1af7;p=mothur.git diff --git a/readblast.h b/readblast.h index 0b47b59..97ce6c7 100644 --- a/readblast.h +++ b/readblast.h @@ -10,18 +10,9 @@ */ #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 getOverlapMatrix() { return overlap; } - string getOverlapFile() { return overlapFile; } - string getDistFile() { return distFile; } + int read(NameAssignment*); + SparseDistanceMatrix* getDistMatrix() { return matrix; } + vector 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 overlap; + SparseDistanceMatrix* matrix; + vector overlap; + MothurOut* m; - void readNames(NameAssignment*); + int readNames(NameAssignment*); }; /*******************************************************************************************/