7 * Created by westcott on 12/10/09.
8 * Copyright 2009 Schloss Lab. All rights reserved.
13 #include "sparsematrix.hpp"
14 #include "nameassignment.hpp"
16 /****************************************************************************************/
21 DistNode(int s1, int s2, float d) : seq1(s1), seq2(s2), dist(d) {}
25 /****************************************************************************************/
27 //Note: this class creates a sparsematrix and list if the read is executed, but does not delete them on deconstruction.
28 //the user of this object is responsible for deleting the matrix and list if they call the read or there will be a memory leak
29 //it is done this way so the read can be deleted and the information still used.
34 ReadBlast(string, float, float, int, bool, bool); //blastfile, cutoff, penalty, length of overlap, min or max bsr, hclusterWanted
37 void read(NameAssignment*);
38 SparseMatrix* getDistMatrix() { return matrix; }
39 vector<DistNode> getOverlapMatrix() { return overlap; }
40 string getOverlapFile() { return overlapFile; }
41 string getDistFile() { return distFile; }
44 string blastfile, overlapFile, distFile;
45 int length; //number of amino acids overlapped
46 float penalty, cutoff; //penalty is used to adjust error rate
47 bool minWanted; //if true choose min bsr, if false choose max bsr
51 vector<DistNode> overlap;
53 void readNames(NameAssignment*);
56 /*******************************************************************************************/