]> git.donarmstrong.com Git - mothur.git/blob - readblast.h
changed random forest output filename
[mothur.git] / readblast.h
1 #ifndef READBLAST_H
2 #define READBLAST_H
3 /*
4  *  readblast.h
5  *  Mothur
6  *
7  *  Created by westcott on 12/10/09.
8  *  Copyright 2009 Schloss Lab. All rights reserved.
9  *
10  */
11
12 #include "mothur.h"
13 #include "sparsedistancematrix.h"
14 #include "nameassignment.hpp"
15
16 /****************************************************************************************/
17
18 //Note: this class creates a sparsematrix and list if the read is executed, but does not delete them on deconstruction.
19 //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
20 //it is done this way so the read can be deleted and the information still used.
21
22 class ReadBlast {
23         
24 public:
25         ReadBlast(string, float, float, int, bool, bool); //blastfile, cutoff, penalty, length of overlap, min or max bsr, hclusterWanted
26         ~ReadBlast() {}
27         
28         int read(NameAssignment*);
29         SparseDistanceMatrix* getDistMatrix()           {       return matrix;          }
30         vector<seqDist> getOverlapMatrix()          {   return overlap;         }
31         string getOverlapFile()                     {   return overlapFile;     }
32         string getDistFile()                        {   return distFile;        }
33         
34 private:
35         string blastfile, overlapFile, distFile;
36         int length;     //number of amino acids overlapped
37         float penalty, cutoff;  //penalty is used to adjust error rate
38         bool minWanted;  //if true choose min bsr, if false choose max bsr
39         bool hclusterWanted;
40         
41         SparseDistanceMatrix* matrix;
42         vector<seqDist> overlap;
43         MothurOut* m;
44         
45         int readNames(NameAssignment*);
46 };
47
48 /*******************************************************************************************/
49
50 #endif
51