]> git.donarmstrong.com Git - mothur.git/blob - suffixdb.hpp
changed random forest output filename
[mothur.git] / suffixdb.hpp
1 #ifndef SUFFIXDB_HPP
2 #define SUFFIXDB_HPP
3
4 /*
5  *  suffixdb.hpp
6  *  
7  *
8  *  Created by Pat Schloss on 12/16/08.
9  *  Copyright 2008 Patrick D. Schloss. All rights reserved.
10  *
11  *      This is a child class of the Database abstract datatype.  The class is basically a database of suffix trees and an
12  *      encapsulation of the method for finding the most similar tree to an inputted sequence.  the suffixForest object
13  *      is a vector of SuffixTrees, with each template sequence being represented by a different SuffixTree.  The class also
14  *      provides a method to take an unaligned sequence and find the closest sequence in the suffixForest.  The search
15  *      method is inspired by the article and Perl source code provided at http://www.ddj.com/web-development/184416093.  I 
16  *      would estimate that the time complexity is O(LN) for each search, which is slower than the kmer searching, but 
17  *      faster than blast
18  *
19  */
20
21 #include "mothur.h"
22 #include "database.hpp"
23 #include "suffixtree.hpp"
24
25 class SuffixDB : public Database {
26         
27 public:
28         SuffixDB(int);
29         SuffixDB();
30         ~SuffixDB();
31         
32         void generateDB() {}; //adding sequences generates the db
33         void addSequence(Sequence);
34         vector<int> findClosestSequences(Sequence*, int);
35
36 private:
37         vector<SuffixTree> suffixForest;
38         int count;
39 };
40
41 #endif